login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A214342
Count of the decimal descendants of the n-th prime.
3
23, 22, 11, 23, 1, 14, 4, 40, 15, 6, 7, 13, 1, 14, 5, 0, 9, 16, 11, 4, 15, 1, 1, 0, 3, 10, 28, 0, 12, 0, 8, 1, 1, 9, 5, 1, 4, 1, 0, 2, 0, 6, 2, 5, 10, 19, 3, 5, 5, 6, 8, 5, 7, 0, 5, 3, 5, 8, 4, 1, 2, 5, 1, 2, 2, 0, 9, 5, 0, 7, 7, 2, 11, 9, 2, 2, 0, 0, 4, 28, 0, 7
OFFSET
1,1
COMMENTS
Prime q is a decimal descendant of prime p if q = p*10+k and 0<=k<=9.
The number of direct decimal descendants is A038800(p).
a(n) is the total count of direct decimal descendants of the n-th prime that are also prime, plus their decimal descendants that are prime, and so on.
Conjecture: no terms bigger than 35 after a(8)=40.
EXAMPLE
prime(3)=5 has eleven descendants: 53, 59, 593, 599, 5939, 59393, 59399, 593933, 593993, 5939333, 59393339. So a(3)=11. All candidates of the form 5nnn1 and 5nnn7 are divisible by 3.
prime(5)=11, the only decimal descendant of 11 that is prime is 113, and because there are no primes between 1130 and 1140, a(5)=1.
MAPLE
A214342 := proc(n)
option remember;
local a, p, k, d ;
a := 0 ;
p := ithprime(n) ;
for k from 0 to 9 do
d := 10*p+k ;
if isprime(d) then
a := a+1+procname(numtheory[pi](d)) ;
end if;
end do:
return a;
end proc: # R. J. Mathar, Jul 19 2012
MATHEMATICA
Table[t = {Prime[n]}; cnt = 0; While[t = Select[Flatten[Table[10*i + {1, 3, 7, 9}, {i, t}]], PrimeQ]; t != {}, cnt = cnt + Length[t]]; cnt, {n, 100}] (* T. D. Noe, Jul 24 2012 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Jul 12 2012
STATUS
approved