My Math Forum Sum of the digits
 User Name Remember Me? Password

 Number Theory Number Theory Math Forum

June 20th, 2019, 03:01 AM   #11
Senior Member

Joined: Aug 2008
From: Blacksburg VA USA

Posts: 351
Thanks: 7

Math Focus: primes of course
Quote:
 Originally Posted by Farzin I have made that list before but I couldn't find that "predictable set of digit sum changes". I need to find a general formula that works for any number of "1"s.
I would say post the 1st 20 sum changes here then, and we'll go from there.
Specifically, from an empty list,
+1, +3, +5,...etc. You can use Wolfram Alpha input "digitsum(xxxx)" if that helps. I did it in a spreadsheet. Unless I'm wrong, the pattern is there. Now, for any # of 1's, it would be just slight variations on what I showed, allowing for the last set not being the full nine, but having only the first 4 of the 9 for example.

 June 20th, 2019, 03:19 AM #12 Newbie   Joined: Mar 2017 From: Norway Posts: 26 Thanks: 0 I made something like this: 760cf057ab2743f28e017b3a1926f278_A.jpg
 June 20th, 2019, 03:32 AM #13 Senior Member   Joined: Mar 2019 From: iran Posts: 316 Thanks: 14 i found a formula s(n) = sum of the digits of (111...1)^2 with n 1s s(n) = (integer part of n/10)*100 + m^2 where m is the last digit of n s(1989) = 198*100 + 9^2 = 19881
 June 20th, 2019, 03:47 AM #14 Newbie   Joined: Mar 2017 From: Norway Posts: 26 Thanks: 0 I am sorry but this is not correct. The correct answer is 17901, but how? For example with your formula when there are 12 "1"s: s(12)=1*100+2^2=104 but the correct answer is: (111111111111)^2=12345679012320987654321 and the sum is 90 Last edited by Farzin; June 20th, 2019 at 04:06 AM.
 June 20th, 2019, 03:58 AM #15 Senior Member   Joined: Mar 2019 From: iran Posts: 316 Thanks: 14 this one is true: s(n) = (integer part of n/9)*81 + m^2 where m is the last digit of n in base 9
 June 20th, 2019, 04:08 AM #16 Newbie   Joined: Mar 2017 From: Norway Posts: 26 Thanks: 0 Can you explain where that formula came from?
 June 20th, 2019, 04:22 AM #17 Senior Member   Joined: Mar 2019 From: iran Posts: 316 Thanks: 14 i checked for smaller bases and i saw this pattern: s(n) = sum of the digits of (111..1)^2 with n 1s in base k s(n) = (integer part of n/(k-1))*(k-1)^2 + m^2 where m is the last digit of n in base (k - 1)
June 20th, 2019, 04:28 AM   #18
Senior Member

Joined: Aug 2008
From: Blacksburg VA USA

Posts: 351
Thanks: 7

Math Focus: primes of course
Quote:
 Originally Posted by Farzin I am sorry but this is not correct. The correct answer is 17901, but how?
Do you not see that 17901 = 221*(1+3+5+7+9+11+13+15+17) ?

 June 20th, 2019, 07:47 AM #19 Newbie   Joined: Mar 2017 From: Norway Posts: 26 Thanks: 0 I do see that 17901 is equal to that product, but is it the general formula? We need to find a general formula which works for any # of "1"s.
 June 20th, 2019, 07:50 AM #20 Senior Member   Joined: Aug 2008 From: Blacksburg VA USA Posts: 351 Thanks: 7 Math Focus: primes of course Yes, I explained it, I led you to the water. I didn't see you post the 20 or so values I suggested...

 Tags digits, sum

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post idontknow Number Theory 3 December 6th, 2015 05:54 AM Albert.Teng Algebra 8 August 27th, 2012 07:39 PM CarpeDiem Elementary Math 7 July 13th, 2012 07:35 PM clandarkfire Algebra 4 May 1st, 2010 11:43 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top