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!)
A171825 Trajectory of 1 under repeated application of i -> A171823(i). 2

%I #2 Mar 30 2012 16:51:56

%S 1,101,11110,1011100,11111100,100010110,1001101100,1010101101,

%T 1010100110,1010101101,1010100110,1010101101,1010100110,1010101101,

%U 1010100110,1010101101,1010100110,1010101101,1010100110,1010101101

%N Trajectory of 1 under repeated application of i -> A171823(i).

%C Has become periodic with period {1010101101,1010100110}.

%p # Apply map to base-10 number

%p F:=proc(n) local t1,t2,t2b,n1,n1b,n0,n0b,t3,t4;

%p t1:=convert(n,base,2);

%p t2:=nops(t1);

%p t2b:=convert(t2,base,2);

%p n1:=add(t1[i],i=1..t2);

%p n1b:=convert(n1,base,2);

%p n0:=t2-n1;

%p n0b:=convert(n0,base,2);

%p t3:=[

%p seq(t2b[nops(t2b)+1-i],i=1..nops(t2b)),

%p seq(n0b[nops(n0b)+1-i],i=1..nops(n0b)),

%p seq(n1b[nops(n1b)+1-i],i=1..nops(n1b))

%p ];

%p t4:="";

%p for i from 1 to nops(t3) do t4:=cat(t4,t3[i]); od:

%p parse(t4);

%p end;

%p # Apply map to binary number

%p G:=proc(n) local t2,t2b,n1,n1b,n0,n0b,t3,t4; global digsum;

%p t2:=length(n);

%p t2b:=convert(t2,base,2);

%p n1:=digsum(n);

%p n1b:=convert(n1,base,2);

%p n0:=t2-n1;

%p n0b:=convert(n0,base,2);

%p t3:=[

%p seq(t2b[nops(t2b)+1-i],i=1..nops(t2b)),

%p seq(n0b[nops(n0b)+1-i],i=1..nops(n0b)),

%p seq(n1b[nops(n1b)+1-i],i=1..nops(n1b))

%p ];

%p t4:="";

%p for i from 1 to nops(t3) do t4:=cat(t4,t3[i]); od:

%p parse(t4);

%p end;

%p # Then do 1, F(1), G(F(1)), G(%), G(%), ... .

%K nonn,base

%O 1,2

%A _N. J. A. Sloane_, Oct 16 2010

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 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)