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.

A304237 a(n) is the smallest positive integer not yet in the sequence that is obtained when the first and last digits of a(n-1) are exchanged and used in a(n) in the exchanged order (but not necessarily adjacent); a(1)=10.

This page as a plain text file.
%I A304237 #20 Jun 28 2018 14:59:34
%S A304237 10,101,11,110,201,12,21,102,121,111,112,210,202,22,122,211,120,301,
%T A304237 13,31,103,131,113,231,123,310,203,32,23,132,212,220,302,213,232,221,
%U A304237 124,41,14,141,114,241,125,51,15,151,115,251,126,61,16,161,116,261,127,71,17,171,117,271,128,81,18,181,118
%N A304237 a(n) is the smallest positive integer not yet in the sequence that is obtained when the first and last digits of a(n-1) are exchanged and used in a(n) in the exchanged order (but not necessarily adjacent); a(1)=10.
%C A304237 Up to n=82, the only consecutive numbers in the sequence are 111, 112 and 222, 223.
%C A304237 Could have started sequence with offset a(0)=0 and it would be the same sequence.
%e A304237 a(2)=101 since 101 is the smallest positive number not yet in the sequence that is obtained when the first and last digits of a(1)=10 are exchanged and used in that order.
%e A304237 a(8)=102 since 102 is the smallest positive number not yet in the sequence that is obtained when the first and last digits of a(7)=21 are exchanged and used in that order (but not necessarily adjacent).
%o A304237 (PARI) firstTerms(n)={my(Seq=vector(n),a=[1,0],c,y,k,h=Vecsmall(0,1000*n));print1("10,");Seq[1]=10;h[11]=1;for(i=2,n,for(t=11,oo,if(!h[t+1],c=digits(t);y=1;while((y<#c)&&(!c[y]),y++);forvec(u=[[y,#c],[y,#c]],if(k=([c[u[1]],c[u[2]]]==[a[#a],a[1]]),break),2);if(k,Seq[i]=t;print1(t",");a=c;h[t+1]=1;break))));return(Seq)} \\ _R. J. Cano_, May 11 2018
%Y A304237 Cf. A107353, A303605.
%K A304237 nonn,base
%O A304237 1,1
%A A304237 _Enrique Navarrete_, May 08 2018