OFFSET
1,1
COMMENTS
Inspired by A064413 (the EKG sequence). Conjecture: The sequence is a permutation of the natural numbers >1, in which composite terms appear once only (in irregular fashion) and the primes arise in their natural order. Immediately following the appearance of any prime p>3 the next term is q*(2^r) where q is the largest prime less than p, and r is the unique integer such that p=q+(2*r).
The above conjecture fails at a(95)=23, which appears before a(162)=19. (Also, the term appearing immediately after 37 is 218=2*109; the term immediately after 97 is 1335=3*5*89.) - Jon E. Schoenfield, Nov 05 2016
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..10000
Jon E. Schoenfield, Magma program for generating a b-file
EXAMPLE
a(2)=4 because sopf(4)=4 and is the smallest number (other than 2) to share a factor (2) with sopf(2)=2.
a(3)=8 since sopf(8)=6 and is the smallest number (other than 2 and 4) to share a factor (2) with sopf(4).
MATHEMATICA
f[n_] := Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]; a = {2}; Do[k = 2; While[Nand[IntersectingQ[f[Total@ f@ k], f[Total@ f@ a[[n - 1]]]], ! MemberQ[a, k]], k++]; AppendTo[a, k], {n, 2, 76}]; a (* Michael De Vlieger, Oct 08 2016 *)
PROG
(Python)
from math import gcd
from sympy import factorint
from functools import cache
from itertools import count, islice
@cache
def sopfr(n): return sum(p*e for p, e in factorint(n).items())
def agen(): # generator of terms
aset, an, mink = {2}, 2, 3
while True:
yield an
s = sopfr(an)
an = next(k for k in count(mink) if k not in aset and gcd(sopfr(k), s)!=1)
aset.add(an)
while mink in aset: mink += 1
print(list(islice(agen(), 76))) # Michael S. Branicky, Feb 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Oct 08 2016
STATUS
approved