OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MAPLE
A130225 := proc(n)
option remember;
if n = 1 then
2;
else
a := procname(n-1) ;
for j from 1 to n-1 do
for d in convert(procname(j), base, 10) do
if d = 2 then
a := a+1 ;
end if;
end do:
end do:
a ;
end if;
end proc:
seq(A130225(n), n=1..80) ; # R. J. Mathar, Aug 06 2016
MATHEMATICA
nxt[{t_, a_}]:=Module[{k=a+t}, {t+DigitCount[k, 10, 2], k}]; NestList[nxt, {1, 2}, 60][[All, 2]] (* Harvey P. Dale, Jun 03 2021 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Aug 05 2007
STATUS
approved