cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A214342 Count of the decimal descendants of the n-th prime.

This page as a plain text file.
%I A214342 #22 Aug 17 2021 02:26:08
%S A214342 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,
%T A214342 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,
%U A214342 2,5,1,2,2,0,9,5,0,7,7,2,11,9,2,2,0,0,4,28,0,7
%N A214342 Count of the decimal descendants of the n-th prime.
%C A214342 Prime q is a decimal descendant of prime p if q = p*10+k and 0<=k<=9.
%C A214342 The number of direct decimal descendants is A038800(p).
%C A214342 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.
%C A214342 Conjecture: no terms bigger than 35 after a(8)=40.
%H A214342 T. D. Noe, <a href="/A214342/b214342.txt">Table of n, a(n) for n = 1..10000</a>
%e A214342 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.
%e A214342 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.
%p A214342 A214342 := proc(n)
%p A214342     option remember;
%p A214342     local a,p,k,d ;
%p A214342     a := 0 ;
%p A214342     p := ithprime(n) ;
%p A214342     for k from 0 to 9 do
%p A214342         d := 10*p+k ;
%p A214342         if isprime(d) then
%p A214342             a := a+1+procname(numtheory[pi](d)) ;
%p A214342         end if;
%p A214342     end do:
%p A214342     return a;
%p A214342 end proc: # _R. J. Mathar_, Jul 19 2012
%t A214342 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 *)
%Y A214342 Cf. A214280, A055781, A055782, A055783, A055784.
%K A214342 nonn,base
%O A214342 1,1
%A A214342 _Alex Ratushnyak_, Jul 12 2012