login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277495 a(1) = 1; a(n) = n if a(n-1) = 1; otherwise, a(n) = digit sum (n written in base a(n-1)). 0
1, 2, 2, 1, 5, 2, 3, 4, 3, 2, 3, 2, 3, 4, 6, 6, 7, 6, 4, 2, 3, 4, 5, 8, 4, 5, 3, 2, 4, 6, 6, 7, 9, 10, 8, 8, 9, 6, 4, 4, 5, 6, 3, 6, 5, 6, 7, 12, 5, 2, 4, 4, 5, 6, 5, 4, 6, 8, 10, 6, 6, 7, 3, 4, 2, 2, 3, 6, 9, 14, 6, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(15-1) = 4; 15 in base 4 is 33; 3+3 = 6, so a(15) = 6.
MATHEMATICA
$RecursionLimit=100
a[1]=1;
a[n_]:=If[a[n-1]!=1, Total[IntegerDigits[n, a[n-1]]], n]
Array[a, 100]
PROG
(PARI) lista(nn) = {print1(a = 1, ", "); for (n=2, nn, if (a==1, a = n, a = vecsum(digits(n, a)); ); print1(a, ", "); ); } \\ Michel Marcus, Oct 21 2016
CROSSREFS
Sequence in context: A203953 A326933 A123398 * A188945 A281261 A102849
KEYWORD
nonn,base
AUTHOR
Cody M. Haderlie, Oct 17 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 9 20:48 EDT 2024. Contains 374191 sequences. (Running on oeis4.)