OFFSET
1,1
COMMENTS
Corresponding k's are 1, 2, 2, 2, 3, 3, 4, 5, 5, 5, 6, 7, 7, 9, 2, 2, 10, 10, 3, 3, 3, 3, 11, 11, 4, 4, 4, 4. - Robert Israel, May 02 2018
Number of primes having a digital length of k=1,2,3...: 0, 1, 3, 2, 1, 3, 1, 2, 0, 1, 4, 6, 33, 81, 329, 455, 2028, 3134, 9193, 9060, 31615, 39246, 88069, 94794, 252965, 309437, ..., . = Robert G. Wilson v, May 05 2018
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
Res:= {}:
for d from 2 to 14 do
for j from 1 to d by 9 do
Res:= Res union select(isprime, {seq((10^d-1)/9 + 8*add(10^i, i=s), s = combinat:-choose([$0..d-1], d-j))})
od od:
sort(convert(Res, list)); # Robert Israel, May 02 2018
MATHEMATICA
f[n_] := Block[{s, t = Tuples[{1, 9}, n]}, s = Select[t, Mod[Plus @@ #, 9] == 1 &]; Select[ FromDigits@# & /@ s, PrimeQ]]; Array[f, 12] // Flatten (* Robert G. Wilson v, May 04 2018 *)
PROG
(PARI) isok(n) = isprime(n) && (Set(digits(n)) == [1, 9]) && ((sumdigits(n) % 9) == 1); \\ Michel Marcus, Oct 16 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Aug 29 2009
EXTENSIONS
Definition corrected by Michel Marcus, Oct 16 2013
Corrected by Robert Israel, May 02 2018
STATUS
approved