|
|
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
|
|
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
|
|
|
KEYWORD
|
nonn,base,more,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Edited. Name specified. Example reformulated. a(12) added (using R. Israel's formula). Keyword less and Crossreferences added. - Wolfdieter Lang, Nov 03 2014
|
|
STATUS
|
approved
|
|
|
|