A379440 a(1) = 1, a(2) = 2, for a(n) > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) such that the exponents of each distinct prime factor of a(n) differ by one from those of the same prime factors of a(n-1).
1, 2, 4, 6, 9, 3, 18, 12, 8, 16, 24, 20, 14, 44, 10, 25, 5, 50, 15, 63, 27, 45, 21, 49, 7, 98, 28, 22, 52, 30, 36, 26, 60, 34, 76, 40, 48, 32, 64, 96, 80, 56, 68, 38, 84, 46, 116, 42, 92, 58, 124, 66, 117, 33, 90, 39, 99, 51, 126, 57, 153, 54, 81, 135, 162, 108, 62, 132, 70, 75, 35, 147, 77, 121, 11, 242, 55, 150, 65, 169, 13, 338, 91, 245, 119, 289, 17
Offset: 1
Examples
a(14) = 44 as 44 = 2^2*11^1, and a(13) = 14 = 2*7 which contains 2^1 as a factor, whose power differs by one from 2^2, while not containing any power of 11. This is the smallest unused number satisfying these criteria. Note that 36 = 2^2*3^2 cannot be chosen as a(13) contains no power of 3 - this is the first term to differ from A379441.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..20000
- Scott R. Shannon, Image of the first 250000 terms. The green line is a(n) = n.
Programs
-
Python
from sympy import factorint from itertools import islice from collections import Counter fcache = dict() def myfactors(n): global fcache if n in fcache: return fcache[n] ans = Counter({p:e for p, e in factorint(n).items()}) fcache[n] = ans return ans def agen(): # generator of terms yield 1 an, a, m = 2, {1, 2}, 3 while True: yield an k, fan = m-1, myfactors(an) sfan = set(fan) while True: k += 1 if k in a: continue fk = myfactors(k) sfk = set(fk) if sfk & sfan and all(abs(fk[p]-fan[p])==1 for p in sfk): an = k break a.add(an) print(list(islice(agen(), 87))) # Michael S. Branicky, May 25 2025
Comments