OFFSET
1,1
COMMENTS
a(n+1) is the smallest prime gap (A001223) that has a prime factor not present in previous gaps or was present but at a lower power.
EXAMPLE
18 is the 7th term: in the first 6 terms, {2, 4, 6, 8, 14, 10}, 3 does not occur with power 2 unlike in 18 = 2 * 3^2.
22 is the 8th term: in the first 7 terms 11 is not a prime factor unlike 22.
Several even numbers do not arise in this sequence, e.g., 12, 20, 36, 48, etc..
MATHEMATICA
s=1; Do[s1=s; s=LCM[s, d=Prime[n+1]-Prime[n]]; If[Greater[s, s1], Print[d]], {n, 1, 10000000}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 27 2003
EXTENSIONS
More terms from Amiram Eldar, Feb 09 2025
STATUS
approved