# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a346979 Showing 1-1 of 1 %I A346979 #12 Oct 03 2021 19:21:05 %S A346979 83,63,23,22,23,11,29,23,3,4,54,1,9,14,6,7,3,4,7,40,0,4,19,15,8,7,10, %T A346979 14,5,6,2,7,0,16,9,11,12,13,4,1,34,1,8,14,5,1,13,5,5,16,6,0,9,0,24,4, %U A346979 6,19,2,9,25,16,0,7,4,4,3,11,2,7,7,4,1,15,2,8,8 %N A346979 Count of the prime decimal descendants of n. %C A346979 The number of direct decimal descendants (i.e., decimal children) of n is A038800(n). The number of prime decimal descendants of the n-th prime is A214342(p_n). a(n) is the number of prime decimal descendants of n, which include the prime decimal children of n, the prime decimal children of the prime decimal children of n, and so on. %C A346979 a(0) = Sum_{m=1..4} (A214342(m) + 1); a(1) = Sum_{m=5..8} (A214342(m) + 1). %C A346979 a(A032352(m)) = 0; a(A119289(m)) = 0. %C A346979 A214342 is a subset, as A214342(m) = a(prime(m)). %C A346979 Conjecture 1: a(n) <= 83. Conjecture 2: lim_{n->oo} (n0/n) = 1, where n0 is the number of zero terms, a(k) = 0, for k <= n. %e A346979 a(4) = 23. The 23 prime decimal descendants of 4 are shown in the tree below. %e A346979 _____ 4__________________________ %e A346979 / | \ %e A346979 41 ___43______________ 47 %e A346979 / / | \ \ %e A346979 419 431 433 439 479 %e A346979 / \ / \ / \ %e A346979 4337 4339 4391 4397 4793 4799 %e A346979 / | \ | | / \ %e A346979 43391 43397 43399 43913 43973 47933 47939 %e A346979 | %e A346979 439133 %e A346979 | %e A346979 4391339 %t A346979 Table[Length@Rest@Flatten[FixedPointList[(b=#;Select[Flatten[(a=#;FromDigits/@(Join[IntegerDigits@a,{#}]&/@If[b=={0},Range@9,{1,3,7,9}]))&/@b],PrimeQ])&,{n}]],{n,0,76}] (* _Giorgos Kalogeropoulos_, Aug 16 2021 *) %o A346979 (Python) %o A346979 from sympy import isprime %o A346979 def p_count(k): %o A346979 global ct; d = [2, 3, 5, 7] if k == 0 else [1, 3, 7, 9] %o A346979 for i in range(4): %o A346979 m = 10*k + d[i] %o A346979 if isprime(m): ct += 1; p_count(m) %o A346979 return ct %o A346979 for n in range(100): %o A346979 ct = 0; print(p_count(n)) %Y A346979 Cf. A030665, A032352, A038800, A119289, A122072, A214342, A218255, A256481. %K A346979 nonn,base %O A346979 0,1 %A A346979 _Ya-Ping Lu_, Aug 09 2021 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE