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.

A165300 a(n) is the smallest number not already present that permits the cyclic repetition of the path 1,2 of the digits in the sequence.

This page as a plain text file.
%I A165300 #12 May 04 2019 21:50:07
%S A165300 1,2,12,121,21,212,1212,12121,2121,21212,121212,1212121,212121,
%T A165300 2121212,12121212,121212121,21212121,212121212,1212121212,12121212121,
%U A165300 2121212121,21212121212,121212121212,1212121212121,212121212121
%N A165300 a(n) is the smallest number not already present that permits the cyclic repetition of the path 1,2 of the digits in the sequence.
%C A165300 Conjecture. (1) If n > 1, and a(n) begins and ends with 1, then a(n+1) is obtained by deleting the initial 1 of a(n); (2) if a(n) begins with 1 and ends with 2 then a(n+1) is obtained by adding a final 1 to a(n); (3) if a(n) begins with 2 and ends with 1 then a(n+1) is obtained by adding a final 2 to a(n); (4) if a(n) begins and ends with 2 then a(n+1) is obtained by adding an initial 1 to a(n). This has been confirmed through a(140), which has 71 digits (and should be fairly easy to prove). - _John W. Layman_, Sep 22 2009
%F A165300 a(n+1) = (1/24)*((a(n) + 10^floor(1 + log_10(a(n))))*(((n-2) mod 4) + ((n-1) mod 4) + 7*(n mod 4) - 5*((n+1) mod 4)) + (10*a(n)+1)*(((n-2) mod 4) + 7*((n-1) mod 4) - 5*(n mod 4) + ((n+1) mod 4)) + (a(n) - 10^floor(log_10(a(n))))*(7*((n-2) mod 4) - 5*((n-1) mod 4) + (n mod 4) + ((n+1) mod 4)) + (10*a(n) + 2)*(-5*((n-2) mod 4) + ((n-1) mod 4) + (n mod 4) + 7*((n+1) mod 4))), with n >= 3 and a(1)=1, a(2)=2. - _Paolo P. Lava_, Oct 02 2009
%e A165300 Starting from 1,2 the next number must be 12 because after 1,2 we shall continue with a 1. But 1 is already in the sequence so we need to add a 2 -> 12. And so on.
%p A165300 P:=proc(i) local a,n; a:=2; print(1);print(2); for n from 3 by 1 to i do a:=1/24*((a+10^floor(1+evalf(log10(a),100)))*(((n-2) mod 4)+((n-1) mod 4)+7*(n mod 4)-5*((n+1) mod 4))+(10*a+1)*(((n-2) mod 4)+7*((n-1) mod 4)-5*(n mod 4)+((n+1) mod 4))+(a-10^floor(evalf(log10(a),100)))*(7*((n-2) mod 4)-5*((n-1) mod 4)+(n mod 4)+((n+1) mod 4))+(10*a+2)*(-5*((n-2) mod 4)+((n-1) mod 4)+(n mod 4)+7*((n+1) mod 4))); print(a); od; end: P(200); # _Paolo P. Lava_, Oct 02 2009
%Y A165300 Cf. A165301-A165307.
%K A165300 easy,base,nonn
%O A165300 1,2
%A A165300 _Paolo P. Lava_ and _Giorgio Balzarotti_, Sep 14 2009
%E A165300 Terms a(21) onward from _John W. Layman_, Sep 22 2009
%E A165300 Edited by _N. J. A. Sloane_, Oct 06 2009