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.
%I A037047 #14 Aug 11 2024 14:41:30 %S A037047 1,0,1,0,0,0,2,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,2,0, %T A037047 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0, %U A037047 1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0 %N A037047 Starting at n, "say what you see"; sequence gives number of primes obtained before first composite number appears. %C A037047 If n itself is a prime, it is not included in the count. - _Antti Karttunen_, Feb 13 2019 %H A037047 Antti Karttunen, <a href="/A037047/b037047.txt">Table of n, a(n) for n = 1..20000</a> %H A037047 P. De Geest, <a href="https://www.worldofnumbers.com/palpri.htm">World!Of Palindromic Primes</a> %e A037047 1 -> 11 (prime) -> 21 (composite), so a(1) = 1. %o A037047 (PARI) %o A037047 A045918(a) = { my(c=1); for(j=2, #a=Vec(Str(a)), if(a[j-1]==a[j], a[j-1]=""; c++, a[j-1]=Str(c, a[j-1]); c=1)); a[#a]=Str(c, a[#a]); eval(concat(a)) }; \\ From A045918 by _M. F. Hasler_, Jan 27 2012 %o A037047 A037047(n) = if(1==n,n,my(c=0); while(1, n = A045918(n); if(isprime(n), c++, return(c)))); \\ _Antti Karttunen_, Feb 13 2019 %Y A037047 Cf. A005150, A036978, A045918. %K A037047 nonn,base %O A037047 1,7 %A A037047 _G. L. Honaker, Jr._ %E A037047 More terms from _Antti Karttunen_, Feb 13 2019