login
Integer lengths of the Champernowne primes (concatenation of first a(n) entries (digits) of A033307 is prime).
5

%I #54 Feb 27 2023 11:18:52

%S 10,14,24,235,2804,4347,37735

%N Integer lengths of the Champernowne primes (concatenation of first a(n) entries (digits) of A033307 is prime).

%C Next term has n > 113821. - _Eric W. Weisstein_, Nov 04 2015

%C Also: concatenation of A007376(1 .. a(n)) is prime. - _M. F. Hasler_, Oct 23 2019

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ChampernowneConstantDigits.html">Champernowne Constant Digits</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ConsecutiveNumberSequences.html">Consecutive Number Sequences</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ConstantPrimes.html">Constant Primes</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/IntegerSequencePrimes.html">Integer Sequence Primes</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SmarandachePrime.html">Smarandache Prime</a>

%t 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}]

%t Cases[FromDigits /@ Rest[FoldList[Append, {}, RealDigits[N[ChampernowneNumber[], 1000]][[1]]]], p_?PrimeQ :> IntegerLength[p]] (* _Eric W. Weisstein_, Nov 04 2015 *)

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime

%o def A071620_gen(): # generator of terms

%o c, l = 0, 0

%o for n in count(1):

%o for d in str(n):

%o c = 10*c+int(d)

%o l += 1

%o if isprime(c):

%o yield l

%o A071620_list = list(islice(A071620_gen(),5)) # _Chai Wah Wu_, Feb 27 2023

%Y Cf. A007376 (infinite Barbier word = almost-natural numbers: write n in base 10 and juxtapose digits).

%Y Cf. A033307 (decimal expansion of Champernowne constant), A176942 (the corresponding primes of length a(n)), A265043.

%Y Cf. A072125.

%K nonn,base,hard,more

%O 1,1

%A _Robert G. Wilson v_, Jun 21 2002

%E Edited by _Charles R Greathouse IV_, Apr 28 2010

%E a(6) = 4347 from _Eric W. Weisstein_, Jul 14 2013

%E a(7) = 37735 from _Eric W. Weisstein_, Jul 15 2013