[go: up one dir, main page]

login
A346979
Count of the prime decimal descendants of n.
0
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, 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, 6, 19, 2, 9, 25, 16, 0, 7, 4, 4, 3, 11, 2, 7, 7, 4, 1, 15, 2, 8, 8
OFFSET
0,1
COMMENTS
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.
a(0) = Sum_{m=1..4} (A214342(m) + 1); a(1) = Sum_{m=5..8} (A214342(m) + 1).
a(A032352(m)) = 0; a(A119289(m)) = 0.
A214342 is a subset, as A214342(m) = a(prime(m)).
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.
EXAMPLE
a(4) = 23. The 23 prime decimal descendants of 4 are shown in the tree below.
_____ 4__________________________
/ | \
41 ___43______________ 47
/ / | \ \
419 431 433 439 479
/ \ / \ / \
4337 4339 4391 4397 4793 4799
/ | \ | | / \
43391 43397 43399 43913 43973 47933 47939
|
439133
|
4391339
MATHEMATICA
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 *)
PROG
(Python)
from sympy import isprime
def p_count(k):
global ct; d = [2, 3, 5, 7] if k == 0 else [1, 3, 7, 9]
for i in range(4):
m = 10*k + d[i]
if isprime(m): ct += 1; p_count(m)
return ct
for n in range(100):
ct = 0; print(p_count(n))
KEYWORD
nonn,base
AUTHOR
Ya-Ping Lu, Aug 09 2021
STATUS
approved