login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004207 a(0) = 1, a(n) = sum of digits of all previous terms.
(Formerly M1115)
28
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; internal format)
OFFSET

0,3

COMMENTS

If the initial 1 is dropped, we get the sequence defined by a(1) = 1, a(n) = a(n-1) + sum of digits of a(n-1).

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 (alexandre.wajnberg(AT)skynet.be), Dec 11 2005

REFERENCES

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

T. D. Noe, Table of n, a(n) for n=0..10000

MAPLE

a[1]:=1:a[2]:=1:for n from 3 to 100 do d:=a[n-1]:s:=0:while d>0 do c:=d mod 10:s:=s+c:d:=(d-c)/10 od:e:=a[n-2]:t:=0:while e>0 do c:=e mod 10:t:=t+c:e:=(e-c)/10 od:a[n]:=a[n-1]+s od: seq(a[n], n=1..54); # [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Mar 19 2009]

MATHEMATICA

f[s_] := Append[s, Plus @@ Flatten[IntegerDigits /@ s]]; Nest[f, {1}, 55] (from Robert G. Wilson v (rgwv(at)rgwv.com), May 26 2006)

f[n_] := n + Plus @@ IntegerDigits@n; Join[{1}, NestList[f, 1, 80]] (Alonso Del Arte, May 27 2006)

PROG

(Haskell)

import Data.List (unfoldr)

a004207 n = a004207_list !! n

a004207_list = 1 : unfoldr q 1 where q s = Just (s, s + a007953 s)

-- Reinhard Zumkeller, Sep 12 2011

CROSSREFS

Cf. A016052, A033298, A007612.

Cf. A007953.

Sequence in context: A130917 A007612 A112395 * A062729 A004620 A018618

Adjacent sequences:  A004204 A004205 A004206 * A004208 A004209 A004210

KEYWORD

nonn,base,easy,nice

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

Errors from 25th term on corrected by Leonid Broukhis Mar 15 1996.

Typo in definition fixed by Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Sep 14 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 00:09 EST 2012. Contains 205978 sequences.