|
|
A004207
|
|
a(0) = 1, a(n) = sum of digits of all previous terms.
(Formerly M1115)
|
|
67
|
|
|
1, 1, 2, 4, 8, 16, 23, 28, 38, 49, 62, 70, 77, 91, 101, 103, 107, 115, 122, 127, 137, 148, 161, 169, 185, 199, 218, 229, 242, 250, 257, 271, 281, 292, 305, 313, 320, 325, 335, 346, 359, 376, 392, 406, 416, 427, 440, 448, 464, 478, 497, 517, 530, 538
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
If the leading 1 is omitted, this is the important sequence b(1)=1, for n >= 2, b(n) = b(n-1) + sum of digits of b(n-1). Cf. A016052, A016096, etc. - N. J. A. Sloane, Dec 01 2013
Same digital roots as A065075 (Sum of digits of the sum of the preceding numbers) and A001370 (Sum of digits of 2^n)); they end in the cycle {1 2 4 8 7 5}. - Alexandre Wajnberg, Dec 11 2005
More precisely, mod 9 this sequence is 1 (1 2 4 8 7 5)*, the parenthesized part being repeated indefinitely. This shows that this sequence is disjoint from A016052. - N. J. A. Sloane, Oct 15 2013
There are infinitely many even terms (Belov 2003).
|
|
REFERENCES
|
N. Agronomof, Problem 4421, L'Intermédiaire des mathématiciens, v. 21 (1914), p. 147.
D. R. Kaprekar, Puzzles of the Self-Numbers. 311 Devlali Camp, Devlali, India, 1959.
D. R. Kaprekar, The Mathematics of the New Self Numbers, Privately printed, 311 Devlali Camp, Devlali, India, 1963.
J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 65.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
G. E. Stevens and L. G. Hunsberger, A Result and a Conjecture on Digit Sum Sequences, J. Recreational Math. 27, no. 4 (1995), pp. 285-288.
|
|
LINKS
|
|
|
FORMULA
|
For n>1, a(n) = a(n-1) + sum of digits of a(n-1).
|
|
MAPLE
|
read("transforms") :
option remember;
if n = 0 then
1;
else
add( digsum(procname(i)), i=0..n-1) ;
end if;
# second Maple program:
a:= proc(n) option remember; `if`(n<2, 1, (t->
t+add(i, i=convert(t, base, 10)))(a(n-1)))
end:
|
|
MATHEMATICA
|
f[s_] := Append[s, Plus @@ Flatten[IntegerDigits /@ s]]; Nest[f, {1}, 55] (* Robert G. Wilson v, May 26 2006 *)
f[n_] := n + Plus @@ IntegerDigits@n; Join[{1}, NestList[f, 1, 80]] (* Alonso del Arte, May 27 2006 *)
|
|
PROG
|
(Haskell)
a004207 n = a004207_list !! n
a004207_list = 1 : iterate a062028 1
(PARI) a(n) = { my(f(d, i) = d+vecsum(digits(d)), S=vector(n)); S[1]=1; for(k=1, n-1, S[k+1] = fold(f, S[1..k])); S } \\ Satish Bysany, Mar 03 2017
(PARI) a = 1; print1(a, ", "); for(i = 1, 50, print1(a, ", "); a = a + sumdigits(a)); \\ Nile Nepenthe Wynar, Feb 10 2018
(Python)
from itertools import islice
def agen():
yield 1; an = 1
while True: yield an; an += sum(map(int, str(an)))
|
|
CROSSREFS
|
A065075 gives sum of digits of a(n).
See A219675 for an essentially identical sequence.
|
|
KEYWORD
|
nonn,base,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|