The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090746 Consider numbers of the form ...19753197531975319, whose digits read from the right are 9,1,3,5,7,9,1,3,5,7,9,1,... Sequence gives lengths of these numbers that are primes. 2

%I #15 May 28 2023 12:52:31

%S 2,8,11,21,54,734,5636,14954

%N Consider numbers of the form ...19753197531975319, whose digits read from the right are 9,1,3,5,7,9,1,3,5,7,9,1,... Sequence gives lengths of these numbers that are primes.

%e a(1) = 2 because 19 is prime and 19 has 2 digits.

%e a(2) = 8 because 31975319 is prime and 31975319 has 8 digits.

%t s = 0; Do[s = s + 10^n*Switch[ Mod[n, 5], 1, 1, 2, 3, 3, 5, 4, 7, 0, 9]; If[ PrimeQ[s], Print[n + 1]], {n, 0, 3000}] (* _Robert G. Wilson v_, Feb 10 2004 *)

%o (PARI) test9(n)= s=0;for(i=0, n, if(Mod(i,5)==0,s=s+9*10^i, if(Mod(i,5)==1,s=s+1*10^i, if(Mod(i,5)==2,s=s+3*10^i, if(Mod(i,5)==3,s=s+5*10^i, if(Mod(i,5)==4,s=s+7*10^i, )))))); return(s);

%o for(j=0,732,if(isprime(test9(j)),print1(j+1, ", ")))

%Y Cf. A090743, A090744, A090745.

%K hard,nonn,base,more,less

%O 1,1

%A mohammed bouayoun (bouyao(AT)wanadoo.fr), Feb 03 2004

%E a(6) from _Robert G. Wilson v_, Feb 10 2004

%E a(7) from _Donovan Johnson_, Mar 06 2008

%E Offset changed to 1 and a(8) from _Michael S. Branicky_, May 27 2023

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 18:29 EDT 2024. Contains 372919 sequences. (Running on oeis4.)