|
|
A071620
|
|
Integer lengths of the Champernowne primes (concatenation of first a(n) entries (digits) of A033307 is prime).
|
|
5
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
f[0] = 0; f[n_Integer] := 10^(Floor[Log[10, n]] + 1)*f[n - 1] + n; Do[If[PrimeQ[FromDigits[Take[IntegerDigits[f[n]], n]]], Print[n]], {n, 1, 3000}]
Cases[FromDigits /@ Rest[FoldList[Append, {}, RealDigits[N[ChampernowneNumber[], 1000]][[1]]]], p_?PrimeQ :> IntegerLength[p]] (* Eric W. Weisstein, Nov 04 2015 *)
|
|
PROG
|
(Python)
from itertools import count, islice
from sympy import isprime
def A071620_gen(): # generator of terms
c, l = 0, 0
for n in count(1):
for d in str(n):
c = 10*c+int(d)
l += 1
if isprime(c):
yield l
|
|
CROSSREFS
|
Cf. A007376 (infinite Barbier word = almost-natural numbers: write n in base 10 and juxtapose digits).
Cf. A033307 (decimal expansion of Champernowne constant), A176942 (the corresponding primes of length a(n)), A265043.
|
|
KEYWORD
|
nonn,base,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|