cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A379440 #22 May 26 2025 00:26:16
%S A379440 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,
%T A379440 28,22,52,30,36,26,60,34,76,40,48,32,64,96,80,56,68,38,84,46,116,42,
%U A379440 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
%N 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).
%C A379440 Like A379442, for the terms studied, prime terms p are preceded by p^2 and followed by 2*p^2, can be divisors of terms before they appear as a term themselves, and are distributed in groups of primes, with many primes within the groups differing by six terms. Unlike A379442 not all primes appear in their natural order, although the occurrence of such primes is rare - only four primes are out of order in the first 250000 terms, namely a(6787) = 179, a(18355) = 353, a(43516) = 593, a(201498) = 1579. In the same range the fixed points are 1, 2, 30, 34, 46, 130, 352, 456, although more may exist. The sequence is conjectured to be a permutation of the positive integers.
%H A379440 Scott R. Shannon, <a href="/A379440/b379440.txt">Table of n, a(n) for n = 1..20000</a>
%H A379440 Scott R. Shannon, <a href="/A379440/a379440.png">Image of the first 250000 terms</a>. The green line is a(n) = n.
%e A379440 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.
%o A379440 (Python)
%o A379440 from sympy import factorint
%o A379440 from itertools import islice
%o A379440 from collections import Counter
%o A379440 fcache = dict()
%o A379440 def myfactors(n):
%o A379440     global fcache
%o A379440     if n in fcache: return fcache[n]
%o A379440     ans = Counter({p:e for p, e in factorint(n).items()})
%o A379440     fcache[n] = ans
%o A379440     return ans
%o A379440 def agen(): # generator of terms
%o A379440     yield 1
%o A379440     an, a, m = 2, {1, 2}, 3
%o A379440     while True:
%o A379440         yield an
%o A379440         k, fan = m-1, myfactors(an)
%o A379440         sfan = set(fan)
%o A379440         while True:
%o A379440             k += 1
%o A379440             if k in a: continue
%o A379440             fk = myfactors(k)
%o A379440             sfk = set(fk)
%o A379440             if sfk & sfan and all(abs(fk[p]-fan[p])==1 for p in sfk):
%o A379440                 an = k
%o A379440                 break
%o A379440         a.add(an)
%o A379440 print(list(islice(agen(), 87))) # _Michael S. Branicky_, May 25 2025
%Y A379440 Cf. A379441, A379442, A379248, A124010, A027746, A051903, A064413, A348086.
%K A379440 nonn,look
%O A379440 1,2
%A A379440 _Scott R. Shannon_, Dec 23 2024