This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037047 Starting at n, "say what you see"; sequence gives number of primes obtained before first composite number appears. 1
 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, 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, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,7 COMMENTS If n itself is a prime, it is not included in the count. - Antti Karttunen, Feb 13 2019 LINKS Antti Karttunen, Table of n, a(n) for n = 1..20000 P. De Geest, World!Of Palindromic Primes EXAMPLE 1 -> 11 (prime) -> 21 (composite), so a(1) = 1. PROG (PARI) 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 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 CROSSREFS Cf. A005150, A036978, A045918. Sequence in context: A258822 A064530 A307832 * A118917 A325045 A204293 Adjacent sequences:  A037044 A037045 A037046 * A037048 A037049 A037050 KEYWORD nonn,base AUTHOR EXTENSIONS More terms from Antti Karttunen, Feb 13 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 23 23:51 EDT 2019. Contains 328379 sequences. (Running on oeis4.)