A377900 After A121053(n) has been found, a(n) is the smallest candidate for A121053(n+1) that has not been eliminated.
1, 1, 1, 6, 6, 9, 9, 9, 12, 12, 12, 15, 15, 15, 18, 18, 18, 21, 21, 21, 24, 24, 24, 26, 26, 28, 28, 32, 32, 32, 32, 34, 34, 36, 36, 39, 39, 39, 42, 42, 42, 45, 45, 45, 48, 48, 48, 50, 50, 52, 52, 55, 55, 55, 57, 57, 60, 60, 60, 63, 63, 63, 65, 65, 68, 68, 68, 70
Offset: 1
Keywords
Examples
After a(8) = 9, and A121053(9) = 10 has been determined, the smallest prime not yet used is 17 and the smallest composite not yet used or eliminated is 12 (10 is now eliminated because the terms of A121053 must be distinct), so a(9) = 12.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..20000
Programs
-
PARI
lista(nn) = my(c=4, t=0); print1("1, 1, 1"); forcomposite(k=4, nn, if(t%2, for(n=c, k-1, print1(", ", k)); c=k); t++); \\ Jinyuan Wang, Nov 29 2024
-
Python
from sympy import isprime from itertools import count, islice def nextcomposite(n): return next(k for k in count(n+1) if not isprime(k)) def agen(): # generator of terms yield from [1, 1, 1] c, c2 = 4, 6 for n in count(4): if n == c2: c, c2 = c2, nextcomposite(nextcomposite(c2)) yield c2 print(list(islice(agen(), 70))) # Michael S. Branicky, Nov 29 2024
Formula
Extensions
More terms from Jinyuan Wang, Nov 29 2024