login
A383780
a(n) is the number of n-digit terms in A383779.
3
4, 12, 46, 103, 396, 717, 2451, 3929, 11803, 17202, 46916, 62668, 157138, 197114, 458064, 541267, 1180018, 1323543, 2718398, 2915696, 5675113, 5839596, 10821575, 10724938, 18983655, 18174231, 30856021, 28608908, 46708476, 42036009, 66157433, 57908390, 88020231, 75070514
OFFSET
1,1
COMMENTS
Conjecture: A383779 is finite, since after the first two terms here, the ratios between successive odd terms and the ratios between successive even terms are quickly decreasing. - Michael S. Branicky, May 11 2025
Indeed, a(n) < a(n-2) for n = 45..55 (see b-file). - Michael S. Branicky, May 15 2025
A383779 is finite with 3356513448 terms (summing terms of b-file); a(n) = 0 for n >= 114. - Michael S. Branicky, May 16 2025
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..115
MATHEMATICA
Unprotect[CompositeQ]; CompositeQ[1]:=True; Protect[CompositeQ]; Q[n_]:=And[AllTrue[FromDigits/@Table[Take[IntegerDigits[n], i], {i, IntegerLength[n], 1, -2}], PrimeQ], AllTrue[FromDigits/@Table[Take[IntegerDigits[n], i], {i, IntegerLength[ n]-1, 1, -2}], CompositeQ]]; a[n_]:=Module[{p=Prime[PrimePi[10^(n-1)]+1], k=0}, While[10^(n-1)<=p<10^n-1, If[Q[p], k++]; p=NextPrime[p]]; k]; Array[a, 7]
PROG
(Python)
from gmpy2 import is_prime, mpz
from itertools import count, islice
def agen():
olst, elst = [2, 3, 5, 7], [11, 13, 17, 19, 41, 43, 47, 61, 67, 83, 89, 97]
yield from (len(olst), len(elst))
for n in count(1):
olst2, elst2 = [], []
for o in olst:
for i in range(1, 100, 2):
t = 100*o + i
if is_prime(t) and not is_prime(t//10):
olst2.append(t)
yield len(olst2)
for e in elst:
for i in range(100):
t = 100*e + i
if is_prime(t) and not is_prime(t//10):
elst2.append(t)
yield len(elst2)
olst, elst = olst2, elst2
print(list(islice(agen(), 16))) # Michael S. Branicky, May 11 2025
CROSSREFS
Cf. A383779.
Sequence in context: A188312 A006735 A166115 * A027288 A149370 A149371
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, May 09 2025
EXTENSIONS
a(12) and beyond from Michael S. Branicky, May 11 2025
STATUS
approved