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!)
A247025 Lengths of prefixes of the infinite string of digits repeat(1379) that are prime. 0
2, 3, 7, 81, 223, 250, 255, 537, 543, 1042, 2103, 4285, 25015, 35361 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Every prime > 5 in base 10 ends in 1, 3, 7, or 9. If those digits are repeated, in order, some prefixes of that string are prime.
n such that floor(1379/9999 * 10^n) is prime. - Robert Israel, Sep 09 2014
a(13) > 15500. - Daniel Starodubtsev, Mar 16 2021
LINKS
EXAMPLE
1 and 3 are the first two digits of the string, and 13 is prime. 13 has length 2, so 2 is a term.
137 is prime and three digits long, so 3 is a term.
1379137 is prime and seven digits long, so 7 is a term.
PROG
(Python)
from sympy import isprime
from itertools import cycle
it=cycle([1, 3, 7, 9])
c=0
a=0
for i in it:
....c+=1
....a*=10
....a+=i
....if isprime(a):
........print c
(PARI) lista(nn) = {s = 0; digs = [1, 3, 7, 9]; id = 1; for (n=1, nn, s = 10*s + digs[id]; if (isprime(s), print1(n, ", ")); id++; if (id==5, id = 1); ); } \\ Michel Marcus, Oct 11 2014
(Magma) [n: n in [0..300] | IsPrime(Floor(1379/9999 * 10^n))]; // Vincenzo Librandi, Oct 17 2014
CROSSREFS
Sequence in context: A101117 A065002 A288800 * A053964 A308730 A062578
KEYWORD
nonn,base,more,less
AUTHOR
Mark E. Shoulson, Sep 09 2014
EXTENSIONS
Edited. Name specified. Example reformulated. a(12) added (using R. Israel's formula). Keyword less and Crossreferences added. - Wolfdieter Lang, Nov 03 2014
a(13)-a(14) from Michael S. Branicky, May 29 2023
STATUS
approved

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 March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)