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!)
A337016 a(0) = 0. Successive terms are double the previous, then with their digits incremented by 1. 0
0, 1, 3, 7, 25, 61, 233, 577, 2265, 5641, 22393, 55897, 2228105, 5567321, 22245753, 555102617, 2221316345, 55537437101, 222185985313, 5554821081737, 222110753274585, 5553326176510281, 22217763464131673, 555466371039374457, 222110438531898591025 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
If 9 appears anywhere in the decimal expansion of 2*a(n-1), we replace that digit with 10 upon incrementing by 1. See a(12) of the Examples section and A216556 for more information.
LINKS
FORMULA
a(n) = A216556(2*a(n-1)), a(0) = 0.
EXAMPLE
To calculate a(12), double 55897 to get 111794, then increment the digits by 1 to get 2228105.
To calculate a(13), double 2228105 to get 4456210, then increment the digits by 1 to get 5567321.
MAPLE
a:= proc(n) option remember; `if`(n=0, 0, (l-> parse(cat(seq(
l[-i]+1, i=1..nops(l)))))(convert(2*a(n-1), base, 10)))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Dec 12 2020
MATHEMATICA
NestList[FromDigits[Flatten@ Map[IntegerDigits, IntegerDigits[2 #] + 1]] &, 0, 24] (* Michael De Vlieger, Dec 11 2020 *)
PROG
(PARI) digs(n) = if (n==0, [0], digits(n));
lista(nn) = {a = 0; print1(a, ", "); for (n=1, nn, a = eval(concat(apply(t->Str(t+1), digs(2*a)))); print1(a, ", "); ); } \\ Michel Marcus, Nov 28 2020
CROSSREFS
Sequence in context: A161637 A329969 A287880 * A148721 A148722 A148723
KEYWORD
base,nonn
AUTHOR
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 April 25 10:34 EDT 2024. Contains 371967 sequences. (Running on oeis4.)