login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Triangle read by rows in which n-th row gives trajectory of n (omitting n itself) under the map k -> k-1 if k odd, k -> k/2 if k even.
5

%I #9 Mar 12 2015 22:59:43

%S 1,2,1,2,1,4,2,1,3,2,1,6,3,2,1,4,2,1,8,4,2,1,5,4,2,1,10,5,4,2,1,6,3,2,

%T 1,12,6,3,2,1,7,6,3,2,1,14,7,6,3,2,1,8,4,2,1,16,8,4,2,1,9,8,4,2,1,18,

%U 9,8,4,2,1,10,5,4,2,1,20,10,5,4,2,1,11,10,5,4,2,1,22,11,10,5,4,2,1,12,6,3

%N Triangle read by rows in which n-th row gives trajectory of n (omitting n itself) under the map k -> k-1 if k odd, k -> k/2 if k even.

%C If you write down 0 when divide by 2, 1 when subtract 1, the trajectory gives the binary expansion of n.

%e Triangle begins:

%e 1;

%e 2,1;

%e 2,1;

%e 4,2,1;

%e 3,2,1;

%e 6,3,2,1;

%e ...

%e 7 -> 6 -> 3 -> 2 -> 1, so the 7th row is 6,3,2,1.

%o (PARI) xnm1(n,p) = { print1(1" "); for(x=1,n, p1 = x; while(p1>1, if(p1%2==0,p1/=2,p1 = p1*p-1;); print1(p1" ") ) ) }

%Y A082404 is a better version.

%K easy,nonn,tabf

%O 2,2

%A _Cino Hilliard_, Mar 27 2003

%E Edited by _N. J. A. Sloane_, Dec 06 2008 at the suggestion of _R. J. Mathar_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 24 00:12 EDT 2024. Contains 376185 sequences. (Running on oeis4.)