login
A082433
a(n) = A072181(n) - p, where p is the largest prime < A072181(n) - 1.
0
3, 5, 7, 7, 11, 11, 11, 11, 13, 23, 17, 17, 17, 41, 191, 47, 31, 53, 53, 53, 31, 179, 61, 61, 337, 131, 523, 523, 419, 223, 223, 223, 223, 79, 3821, 3821, 3821, 23399, 21269, 21269, 3607
OFFSET
3,1
COMMENTS
Are all terms prime?
All terms are odd. - Michael S. Branicky, Sep 05 2021
EXAMPLE
a(4) = A072181(4)-7 = 12-7 = 5.
PROG
(Python)
from sympy import factorint, isprime
def afindn(terms):
prev_factors, prevan, prevk, n = dict(), 1, None, 2
for n in range(2, terms+1):
n_factors, an = factorint(n), 1
for pi in set(prev_factors.keys()) | set(n_factors.keys()):
ei = prev_factors[pi] if pi in prev_factors else 1
fi = n_factors[pi] if pi in n_factors else 1
an *= pi**(ei*fi)
if n >= 3:
if an != prevan:
k = 3
while not isprime(an - k): k += 2
else:
k = prevk
print(k, end=", ")
prevk = k
prev_factors, prevan = factorint(an), an
afindn(36) # Michael S. Branicky, Sep 05 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Naohiro Nomoto, Apr 25 2003
EXTENSIONS
a(36)-a(40) from Jinyuan Wang, Sep 05 2020
a(41)-a(43) from Michael S. Branicky, Sep 05 2021
STATUS
approved