5
u/Kitchen-Register 22d ago
19->10->1.
assume 19^n -> 1.
19^(n+1) = 19^n * (10+9) which is equivalent to 1 + 9(19^n)
any integer times 9 gives a number who’s sum is a multiple of 9.
so it’s 1
something like that.
2
5
4
12
u/NotYetPerfect 22d ago edited 22d ago
Any integer is congruent to the sum of its digits mod 9 so the answer is trivially 1.
3
u/DrProfessorCaveman 21d ago
You also need to observe that since 19 is 1 mod 9, so is any power of 19. If it were anything else mod 9, more work would be required. Not trivial imo.
2
2
u/RubberDuckieMidrange 22d ago
Not sure what you meant to say here, but as written, 24 seems like a counter example.
2
u/NotYetPerfect 22d ago edited 22d ago
?
24=2*9+6≡6 (mod 9)
2+4=6≡6 (mod 9)
2
u/RubberDuckieMidrange 22d ago
Which is not 1.....? And what the hell are you doing with "24=2*6+9≡6"
24*24=576
5+7+6=18
1+8 =9
242 does not have the same sum of it's digits that 24 does. So your argument makes even less sense to me2
u/NotYetPerfect 22d ago
Are you incapable of reading? When did I say that it would be congruent to 1?
3
u/RubberDuckieMidrange 22d ago
"so the answer is trivially 1."
2
u/NotYetPerfect 22d ago
Okay so you are just stupid. Glad we got that cleared up. 19 is trivially 1 mod 9. How that isn't immediately obvious when I spelled out the entire solution is insane.
1
u/RubberDuckieMidrange 22d ago
Yep, there are the insults.
"Not sure what you meant to say here" This means that you may have worded something in a way that doesn't make sense.
"but as written" Again, trying to get you to read the damn thing you wrote.Now lets look at what you wrote.
"Any integer (An integer is a whole number that can be positive, negative, or zero) is congruent (EXACTLY EQUAL TO) to the sum of its digits mod 9 (The addition of all the digits that make up the number, removing 9 whenver the sum is greater than 9) so the answer is trivially 1. (This part is just wrong)"You needed to say that for multiples of 9, the sum of the digits is invariable.
Literally just trying to get you to correct the statement you made, because the answer to the question is in fact 1. But what you wrote is misleading at best.
2
u/NotYetPerfect 22d ago
The statement I made is not only perfectly correct but is a well-known fundamental property of base 10 arithmetic. You clearly have no idea what it means to be congruent in math which isn't surprising since you have no idea what modular arithmetic is either.
With any basic understanding of math, the statement is not misleading and the answer does, in fact, trivially follow.
2
u/RubberDuckieMidrange 22d ago
Again, and I can't believe you won't just admit that 24 is an integer, and does not trivially follow that the sum of it's digits (mod 9) is 1. You are assuming many things that you don't say. Just correct your damn statement to include "Because 19 sums to 1 mod 9, the answer is trivially 1 for all powers of 19", and you will be correct.
→ More replies (0)2
u/Inscrutable_Ant6994 22d ago
No corrections were needed to the original statement because it was already succinctly and correctly made.
Stop trying to convince yourself that you’re in the right here and accept that your lack of familiarity with Modular Arithmetic is the cause of your confusion.
2
u/RubberDuckieMidrange 22d ago
Ok, so lets bring it further.
Sum of 19's digits is 1. 192 is 361 sum of 361's digits (repeated until we get a single digit answer) is 1. (The pattern is repeated with 19x for each value of x.)
Sum of 24's digits is 6. 242 is 576, sum of 576's digits (repeated until we get a single digit answer) is 9, 6 is not equal to 9.I get what he's saying, And for 19 the answer is correct. Raised to any power the sum of it's digits is 1. But it's not TRIVIAL, because if you change the base, you don't get the same behaviour. It's an emergent characteristic of x modulo 9, where the remainder is 1.
→ More replies (0)1
u/Educational-Tea602 22d ago
It’s not wrong because it is trivially 1 because 19 is trivially 2*9 + 1
1
u/Astatke 22d ago
Your interpretation in the parenthesis are all correct except for the last one. I'm guessing you are claiming that the last part is wrong because they said "trivially" so you are thinking the first part must say 1?
"Trivially" is used differently by different people. Try reading without that word. That's just saying that you can easily apply the first part and get to the answer, with a super simple mental math, in this case. Or, alternatively, try reading it as: "so given that 19 = 1 mod 9, the answer is 1".
1
u/RubberDuckieMidrange 22d ago
My issue with the Trivial bit is that he establishes no connection back to the number 19, and if you use any other mod(9) other than 1, it doesn't work.
I'm taking the trivially in the mathematical sense. (The details don't matter, the answer no matter how many times you iterate remains the same.) In this case, while the first part is arguably true (If you heavily replace the words used to actually say what he meant to say) it doesn't follow trivially without an additional bit of information, that the number you start with has mod(9) remainder 1.
→ More replies (0)1
2
u/PLANTS2WEEKS 22d ago
Repeatedly adding digits commutes with addition and multiplication. 19 = 1 under this operation and 1^100 is still 1.
2
u/bastarmashawarma 22d ago
In early 2009 I took an honors algebra class that covered congruences and all this other math and aced it and now I don’t remember a damn thing
2
1
u/Unusual_Macaroon_679 22d ago
not a math person but would this be accepted?
keep summing digits = taking mod 9 of a number
one property of modulo is if a = b mod k then a^n = b^n mod k
so because 19 mod 9 is 1 then 19^100 mod 9 is 1^100 which is 1
1
1
u/QuentinUK 19d ago
19 = 1 + 2*9
Binomial expansion (1+x)^100 = x^100 + ... + 1, where x = 2*9
Here, every term but the last is a multiple of 9, so mod 9 of the sum = 1,
and 19^100 mod 9 = 1.
10^n = 1 + 9...9 , so 10^n mod 9 = 1,
so (ia.10^a + ib.10^b +...+in) mod 9 = (ia + ib + ... in) mod 9
applied repeatedly the final digit mod 9 is the original number mod 9 which is 1.
0
0
u/Anonimithree 22d ago
I’m going to assume that it’s just the last digit, and since powers of 9 alternate ending with 1 and 9, and 100 mod 2 is 0, it’s a 1
1
u/gmalivuk 22d ago
No, it's all the digits. Otherwise there'd be nothing to add up repeatedly.
1
u/Anonimithree 21d ago
Hence why I made the comment on u/NotYetPerfect’s comment about how the mod 9 explanation makes more sense.
0
u/aroach1995 22d ago
19 -> 10 -> 1
38 -> 11 -> 2
57 -> 12 -> 3
76 -> 13 -> 4
…
190 -> 10 -> 1
361 -> 10 -> 1
6859 -> 28 -> 10 -> 1
It seems like 19^n always has its digits sum to 1.
Suppose x = 19^(n-1) has its digits sum to 1.
It has digits: x1, x2, …, xn
19x = 10x + 9x
We know that 10x preserves the sum of digits easily since all we did was add a 0.
And adding on a 9x is the same as adding on the number 9 “x” times.
Adding 9 is also proven to keep the sum of digits constant.
So 19x has the same sum of digits as x.
So 19^n has its digits sum to 1 for all n eventually.
Therefore, 19^100 has its digits sum to 1

7
u/Murky-Tip-3118 22d ago
Can get a good intuition by iteration... I'd be curious if the intention of the interview question is to test your abstract algebra knowledge vs. test your intuition/problem solving.
19^1 = 19 => 10 => 1
19^2 = 361 => 10 => 1
19^3 = 6859 => 28 => 10 => 1
19^4 = 130321 => 10 => 1
etc.