The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A270343 Numbers n that end with ( sum of digits of n )^2. 1
 0, 1, 81, 3144, 3256, 6225, 6484, 6576, 7121, 7529, 7676, 9100, 9324, 9361, 9729, 9784, 12144, 12256, 15225, 15484, 15576, 16121, 16529, 16676, 18100, 18324, 18361, 18729, 18784, 21144, 21256, 24225, 24484, 24576, 25121 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS All terms end with a digit from the set S = {0,1,4,5,6,9}. The sum of the digits of the numbers repeat and also change with regular intervals. For example the sum of the digits S1 = {12,16,15,22,24,11,23,26,10,18,19,27,28} which is followed by 3144 to 8784, 12144 to 18784, 21144 to 27784, 30144 to 36784. Again S2 = {21,25,15,22,24,11,23,26,10,18,19,27,28} is followed by 39441 to 45784,48441 to 54784, 57441 to 67784, 66441 to 72784. It can be seen that a set containing 13 elements repeats itself for 4 consecutive ranges. LINKS Paolo P. Lava, Table of n, a(n) for n = 1..10000 Soumil Mandal, Graph Of Sum Of Digits Soumil Mandal, Graph Of Cumulative Sums EXAMPLE For n=3256, sum of digits is 16 and 16^2 is 256. For n=7121, sum of digits is 11 and 11^2 is 121. For n=18784, sum of digits is 22 and 22^2 is 484. MAPLE P:= proc(q) local a, b, k, n; for n from 1 to q do a:=0; b:=n; for k from 1 to ilog10(n)+1 do a:=a+(b mod 10); b:=trunc(b/10); od; if a^2=(n mod 10^(ilog10(a^2)+1)) then print(n); fi; od; end: P(10^6); # Paolo P. Lava, Mar 17 2016 MATHEMATICA Select[Range[0, 20000], Function[n, Function[k, If[n >= k, FromDigits@ Take[#, -IntegerLength@ k] == k, False]][Total[#]^2] &@ IntegerDigits@ n]] (* Michael De Vlieger, Mar 15 2016 *) PROG (PARI) isok(n) = {sds = sumdigits(n)^2; nbs = #Str(sds); ((n - sds) % 10^nbs) == 0; } \\ Michel Marcus, Mar 16 2016 (Python) for i in range(0, 200000):     res = pow((sum(map(int, str(i)))), 2)     if(i%pow(10, len(str(res)))==res):print(i) # Soumil Mandal, Mar 17 2016 CROSSREFS Cf. A003226, A008851, A018247, A118881. Sequence in context: A295252 A295651 A143652 * A236894 A231768 A017797 Adjacent sequences:  A270340 A270341 A270342 * A270344 A270345 A270346 KEYWORD base,nonn,easy AUTHOR Soumil Mandal, Mar 15 2016 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 26 10:52 EDT 2020. Contains 338027 sequences. (Running on oeis4.)