login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A001202 a(1)=0, a(2n) = a(n)+1, a(2n+1) = 10*a(n+1). 2

%I

%S 0,1,10,2,100,11,20,3,1000,101,110,12,200,21,30,4,10000,1001,1010,102,

%T 1100,111,120,13,2000,201,210,22,300,31,40,5,100000,10001,10010,1002,

%U 10100,1011,1020,103,11000,1101,1110,112,1200,121,130,14,20000,2001,2010

%N a(1)=0, a(2n) = a(n)+1, a(2n+1) = 10*a(n+1).

%H T. D. Noe, <a href="/A001202/b001202.txt">Table of n, a(n) for n = 1..8192</a>

%t Clear[t]; t[1] = 0; t[n_] := t[n] = If[Mod[n, 2] == 0, t[n/2] + 1, 10*t[(n + 1)/2]]; Table[t[n], {n, 2^8}] (* _T. D. Noe_, Jun 26 2012 *)

%o (MAGMA) [n eq 1 select 0 else IsEven(n) select Self(n div 2)+1 else 10*Self((n+1) div 2): n in [1..60]]; // _Bruno Berselli_, Mar 07 2013

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_.

%E Explanation (and correction) supplied by Jay Coskey (jmc(AT)tera.com) 8/97.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 23:41 EDT 2021. Contains 343868 sequences. (Running on oeis4.)