cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A171825 #2 Mar 30 2012 16:51:56
%S A171825 1,101,11110,1011100,11111100,100010110,1001101100,1010101101,
%T A171825 1010100110,1010101101,1010100110,1010101101,1010100110,1010101101,
%U A171825 1010100110,1010101101,1010100110,1010101101,1010100110,1010101101
%N A171825 Trajectory of 1 under repeated application of i -> A171823(i).
%C A171825 Has become periodic with period {1010101101,1010100110}.
%p A171825 # Apply map to base-10 number
%p A171825 F:=proc(n) local t1,t2,t2b,n1,n1b,n0,n0b,t3,t4;
%p A171825 t1:=convert(n,base,2);
%p A171825 t2:=nops(t1);
%p A171825 t2b:=convert(t2,base,2);
%p A171825 n1:=add(t1[i],i=1..t2);
%p A171825 n1b:=convert(n1,base,2);
%p A171825 n0:=t2-n1;
%p A171825 n0b:=convert(n0,base,2);
%p A171825 t3:=[
%p A171825 seq(t2b[nops(t2b)+1-i],i=1..nops(t2b)),
%p A171825 seq(n0b[nops(n0b)+1-i],i=1..nops(n0b)),
%p A171825 seq(n1b[nops(n1b)+1-i],i=1..nops(n1b))
%p A171825 ];
%p A171825 t4:="";
%p A171825 for i from 1 to nops(t3) do t4:=cat(t4,t3[i]); od:
%p A171825 parse(t4);
%p A171825 end;
%p A171825 # Apply map to binary number
%p A171825 G:=proc(n) local t2,t2b,n1,n1b,n0,n0b,t3,t4; global digsum;
%p A171825 t2:=length(n);
%p A171825 t2b:=convert(t2,base,2);
%p A171825 n1:=digsum(n);
%p A171825 n1b:=convert(n1,base,2);
%p A171825 n0:=t2-n1;
%p A171825 n0b:=convert(n0,base,2);
%p A171825 t3:=[
%p A171825 seq(t2b[nops(t2b)+1-i],i=1..nops(t2b)),
%p A171825 seq(n0b[nops(n0b)+1-i],i=1..nops(n0b)),
%p A171825 seq(n1b[nops(n1b)+1-i],i=1..nops(n1b))
%p A171825 ];
%p A171825 t4:="";
%p A171825 for i from 1 to nops(t3) do t4:=cat(t4,t3[i]); od:
%p A171825 parse(t4);
%p A171825 end;
%p A171825 # Then do 1, F(1), G(F(1)), G(%), G(%), ... .
%K A171825 nonn,base
%O A171825 1,2
%A A171825 _N. J. A. Sloane_, Oct 16 2010