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!)
A130225 a(1) = 2; a(n) = a(n-1) + (number of times the digit 2 has appeared in the sequence so far). 1

%I #8 Jun 03 2021 15:24:17

%S 2,3,4,5,6,7,8,9,10,11,12,14,16,18,20,23,27,32,38,44,50,56,62,69,76,

%T 83,90,97,104,111,118,125,133,141,149,157,165,173,181,189,197,205,214,

%U 224,236,249,263,278,294,311,328,346,364,382,401,420,440,460,480,500,520

%N a(1) = 2; a(n) = a(n-1) + (number of times the digit 2 has appeared in the sequence so far).

%H Harvey P. Dale, <a href="/A130225/b130225.txt">Table of n, a(n) for n = 1..1000</a>

%p A130225 := proc(n)

%p option remember;

%p if n = 1 then

%p 2;

%p else

%p a := procname(n-1) ;

%p for j from 1 to n-1 do

%p for d in convert(procname(j),base,10) do

%p if d = 2 then

%p a := a+1 ;

%p end if;

%p end do:

%p end do:

%p a ;

%p end if;

%p end proc:

%p seq(A130225(n),n=1..80) ; # _R. J. Mathar_, Aug 06 2016

%t 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 *)

%K base,easy,nonn

%O 1,1

%A _Eric Angelini_, Aug 05 2007

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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)