A355238 First occurrence of difference n between two consecutive terms of A000404. a(n) gives the upper term. The lower term is A355237.
18, 10, 5, 17, 25, 80, 97, 145, 386, 3060, 997, 1681, 4194, 6544, 1508, 8450, 9721, 22178, 10728, 5185, 16130, 154730, 58441, 31681, 52418, 401506, 176837, 101377, 105601, 678386, 241913, 501748, 393850, 284036, 685576, 1437389, 1751333, 3225616, 3439297, 2479634
Offset: 1
Keywords
Programs
-
Python
from itertools import count from sympy import factorint def A355238(n): m = 2 for k in count(2): c = False for p in (f:=factorint(k)): if (q:= p & 3)==3 and f[p]&1: break elif q == 1: c = True else: if c or f.get(2,0)&1: if k-m == n: return k m = k # Chai Wah Wu, Jul 01 2022
Formula
a(n) = A355237(n) + n.