I am trying to prove that $k$ is divisible by $3$ iff the sum of the digits of $k$ is divisible by 3 for all $k \in Z$.  I am not even sure what tags to use because I am not sure of right methods to use to solve this problem. I don't see how you could solve this with induction. Any tips on the general approach would be appreciated.
The divisibility rule for $3$ is well-known: if you add up the digits of $n$ and the sum is divisible by $3$, then $n$ is divisible by three.  This is quite helpful for determining if really large numbers are multiples of three, because we can recursively apply this rule:  $$1212582439 \rightarrow 37 \rightarrow 10\rightarrow 1 \implies 3\not\mid 1212582439$$ $$124524 \rightarrow 18 \rightarrow 9 \implies 3\mid 124524$$  This works for as many numbers as I've tried.  However, I'm not sure how this may be proven.  Thus, my question is:     Given a positive integer $n$ and that $3\mid\text{(the sum of the digits of $n$)}$, how may we prove that $3\mid n$?
If a function returns no value, with a valid return type, is it okay to for the compiler to return garbage? I was caught cheating on an exam, how can I minimize the damage? I got caught cheating in a two-hour engineering exam consisting of 100 multiple choice questions which was done online through the  e-learning software. I feel like my life is almost over.  Having not studied well and having no time to study, I decided to cheat. I know there are no excuses for cheating. Before the exam I dug up research about moodle exams, and it turned out you can take the exam anywhere you want to as long as you have the quiz password. Taking advantage of this, I went up to my engineering library and asked a close friend who was taking the exam to send me the quiz password before he starts.  What I had prepared:   Calculator (was not allowed during the quiz). Printed material (consisted of more than 200 pages). Google search engine (on a laptop ready to help). Whatsapp (to ask questions for a friend who took the quiz last year).   As I sat down, I did the first 50 questions, suddenly the quiz froze and moodle told me:      you are not allowed to take the exam from this location.   While I was leaving, one instructor responsible for the course (there are 5) came and found me. She accused me of cheating, took my mobile and made come with her to a huge office where two instructors searched all my mobile (took the name of my friend who gave me the password), and started talking to me, asking for all details of this crime. They took and confiscated my phone and looked at everything: Whatsapp conversations, all my emails, and images. The instructor took the mobile from my hand without asking me and kept it with her. It seems that the instructors are going to report me as well as my friend who sent me the password for the exam.  The university's Student Code Conduct said that cheating will result in one of the following: a Dean's Warning, Suspension, or Expulsion. If any of that happens, my future is over. A dean's warning will cancel my financial aid. A suspension would be for at least two years, and coming back would require a lot of work. An expulsion will be definite.  I've learned the lesson about cheating, now how can I fix this? How can I prevent the five instructors from reporting me? It's obvious that I should speak to them, but what should I say? What can I do? My future is almost over, but many of you are teachers and instructors here, what can I do to fix this?    EDIT: Wow, it has been almost 3 years. I would like to update on how I dealt with the situation.   Lesson: It was obvious to never ever cheat under any circumstances, and it was not whether you'd get caught or not.    Consequences: I received a Dean's warning but the financial aid wasn't revoked. However, I couldn't stay in the department as engineering was not for me and I was even ashamed to stay in the university.  What happened next: I transferred to an ABET-accredited Computer Science institution and I graduated with distinction in 2.5 years. It was extremely stressful as I had taken 6 major courses (18 credits) in one semester, but I had to do it.  Future plans: I'm going for an MSc in Computer Science in St Andrews next year. I just upgraded my texlive distribution and can no longer insert space in table rows using \\[x pt] syntax when colortbl is loaded.  It seems that recent changes to array.sty might be the problem as this is the only package to change recently.  Can anyone suggest a workaround?  MWE  \listfiles \documentclass{article} \usepackage{colortbl} \begin{document} \begin{tabular}{l}   \hline   No space below with \texttt{colortbl.sty} loaded. \\[10mm]   \hline \end{tabular} \end{document}   File versions in use:   article.cls    2014/09/29 v1.4h Standard LaTeX document class   size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option) colortbl.sty    2012/02/13 v1.0a Color table columns (DPC)    array.sty    2018/04/07 v2.4g Tabular extension package (FMi)    color.sty    2016/07/10 v1.1e Standard LaTeX Color (DPC)    color.cfg    2016/01/02 v1.6 sample color configuration   pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex This is something I just realised I don't entirely know the answer to, so I'm going to ask it here as I think it's interesting.  In most non-scientific writing on depth of field, diagrams generally show camera and subjects as being perfectly parallel, e.g.    However, is this a more accurate representation of the focal plane?    Are there ways to optically alter the shape of the focal plane?  Note: Obviously these diagrams are two dimensional, but I'm assuming in the second diagram the shape would be spherical with the sensor at the center. Laptop randomly waking up = Hibernate / Low Battery? What is the difference between an SLR and a DSLR? What are the differences between SLRs and DSLRs? (I know that DSLRs are Digital SLRs but are there any actual differences?)  Also, what are the advantages/disadvantages of both? Recalculate google sheet on demand: I have the following formula in a sheet:  =if(E1="HOLD",,query(Cust_Orders!B6:Z5000,"Select Y,G,I,H,K where H&gt;0  "))   With E1 being a drop down with values HOLD and FETCH  The recalculation when I go to FETCH takes about 13 seconds.  But when it is in HOLD, the query doesn't exceute, and everything goes blank. Not what I want.  I'm trying to avoid recalculating this query every time I make a change in the Cust_Orders range, but keep the old values, as two different pivot tables that are viewed by other people are dependent on it.  Google spreadsheet recalc settings all are 'on change and foo'  Is there a way to do this? When closing a question as a duplicate, it is becoming harder and harder to search for a good original as the pool of questions and answers grows and grows.  While the new dupe closing dialog is a huge step forward, it doesn't always work - if you've spent some time on the site, you know there are perfect answers to many new questions but you can't always find them. Or can't be bothered to, as your time is limited.  A way to further improve this could be introducing a vote for canonical answers.  It could, for example, work like this:   Answers get a new icon, the "canonical vote" (signified here by a cannon because I can't think of anything that makes sense right now.)     Only users with a certain minimum rep (maybe 1k+ or 2k+) see this icon. The icon would work like the favourite icon: You can toggle it on or off at any time. The hover message for the icon could read e.g.      This is a "canonical answer": It answers the question asked in the most extensive and general way, and is very likely to benefit other users with the same problem.    Questions that contain an answer with three or more canonical votes get special  treatment:      They show up on the top in search results; maybe even under a special heading ("Questions with canonical answers")  They show up prominently in the "close as dupe" dialog (i.e. the canonical votes influence the metric that is used to determine the questions shown there).  There could be some rewards for users whose answers receive "canonical" votes - maybe a badge if ten of your answers get at least three canonical votes, or a counter of canonical answers in your profile. It would be really interesting as it's a badge that you can't game your way to, but this whole rewarding part is entirely optional.  would be a great safeguard against over-use of this feature.    Dupe (but sans cannon):       Related: Should I use center or centering for figures and tables? What is the correct way to center figures and tables (figure, table)?  \begin{center} ... \end{center}   or   \begin{centering} ... \end{centering} Why should users never use normal sudo to start graphical applications? I've read  and am interested in this line:     You should never use normal sudo to start graphical applications as Root.   Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user. mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc... expects parameter 1 to be resource I have put a bounty on , however I don't see it appear in the  (also not when I'm not logged in).  Why is this. Aren't all bounty questions supposed to be visible there? Currentsection TOC in scrartcl? I like to get a toc at beginning of some of my sections, like in beamer where I can use \tableofcontents[currentsection] is there a possibility in scrartcl?  Something like this:  \documentclass[10pt,a4paper]{scrartcl} \usepackage[ngerman]{babel}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \begin{document}  \tableofcontents %complete  \section{First}  \section{Second} \tableofcontents %just subsection and subsubsection \subsection{SecondSub} \subsubsection{please} \subsection{this} \subsection{SecondSub2} \subsection{parts}  \section{Third} \subsection{another}  \end{document}   Looks like:  Inhaltsverzeichnis %complete  1 First  2 Second 2.1 SecondSub.......................2 2.1.1 please........................2 2.1.2 this..........................2 2.2. SecondSub2.....................3 2.2.1 parts.........................4  3 Third 3.1 another ........................5   1 First  2 Second  Inhaltsverzeichnis %just subsection and subsubsection 2.1 SecondSub.......................2  2.1.1 please........................2  2.1.2 this..........................2 2.2. SecondSub2.....................3  2.2.1 parts.........................4  2.1 SecondSub  2.1.1 please   2.1.2 this  2.2. SecondSub2  2.2.1 parts   3 Third  3.1 another How to concatenate characters in java? How do you concatenate characters in java? Concatenating strings would only require a + between the strings, but concatenating chars using + will change the value of the char into ascii and hence giving a numerical output. I want to do System.out.println(char1+char2+char3... and create a String word like this.  I could do   System.out.print(char1); System.out.print(char2); System.out.print(char3);   But, this will only get me the characters in 1 line. I need it as a string. Any help would be appreciated.  Thanks How is arccos derived? Stupid question but I need to understand:  If $ \cos = \dfrac{\text{adjacent}}{\text{hypotenuse}} $  What is arcosine? $ \text{adjacent} \cdot \text{hypotenuse}$? Is this the same for arcsine and arctangent? Making Change for a Dollar (and other number partitioning problems) I was trying to solve a problem similar to the "how many ways are there to make change for a dollar" problem.  I ran across a  that said I could use a generating function similar to the one quoted below:     The answer to our problem (293) is the   coefficient of $x^{100}$ in the reciprocal   of the following:      $(1-x)(1-x^5)(1-x^{10})(1-x^{25})(1-x^{50})(1-x^{100})$   But I must be missing something, as I can't figure out how they get from that to $293$. Any help on this would be appreciated. I have just dropped a half full latté on my company laptop and am not sure what to do.  Is there a way I can make sure that my laptop is usable again?  What steps must I go through to improve it's chances of survival? How can I decode HTML characters in C#? Number of normals from a point to an ellipse From a typical point $P$ inside an ellipse, how many points $Q_i$ on the ellipse have $PQ_i$ normal to the ellipse?  Someone asked me at school many years ago but I don't think I worked it out. I really tried hard to do this on my own, but I keep failing ... Using multi-column and multi-row commands confused me. I know some of you might frown upon such a request but I really need help getting this table implemented .. So I'm sorry if I upset anyone.  My preamble has :   \documentclass[12pt,a4paper]{report} \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry} \linespread{1.5}     Is there a way I can convert this from excel to LaTeX form ? I tried an add-in before but it didn't work for me. Also online generators cannot combine cells the way I want them (unless I didn't find a better table generator ? )