A337016 a(0) = 0. Successive terms are double the previous, then with their digits incremented by 1.
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
Offset: 0
Examples
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.
Programs
-
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 *)
-
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
Formula
a(n) = A216556(2*a(n-1)), a(0) = 0.
Comments