login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A352187 a(1)=1, a(2)=2; thereafter, a(n) is the smallest number m not yet in the sequence such that gcd(m,a(n-1)) > 1 and gcd(m,a(n-2))=1, except that the second condition is ignored if it would imply that no choice for m were possible. 13
1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, 18, 14, 7, 21, 24, 16, 20, 25, 30, 22, 11, 33, 27, 36, 26, 13, 39, 42, 28, 32, 34, 17, 51, 45, 35, 49, 56, 38, 19, 57, 48, 40, 55, 77, 63, 54, 44, 121, 66, 46, 23, 69, 60, 50, 52, 91, 105, 72, 58, 29, 87, 75, 65, 104, 62, 31, 93, 78, 64, 68, 85, 95, 76, 74, 37, 111, 81, 84, 70, 115, 207, 96, 80 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This is an intermediate sequence between the EKG sequence A064413 (which only involves the first condition) and the Enots Wolley sequence A336957 (which involves both conditions).
By ignoring the second condition when necessary we guarantee that a(n) always exists (because it always exists for the EKG sequence), and so no backtracking is needed in this sequence.
The second condition is ignored precisely when every prime that divides a(n-1) also divides a(n-2).
Conjecture 1: Every positive number appears.
Conjecture 2: The primes are the slowest numbers to appear. That is, when a prime p appears here, all numbers less than p have already appeared. To put this another way, the record high points in A352188 ("when does n appear") are exactly the primes (and 1).
Conjecture 3: When a prime p first divides some term, that term is 2*p, which is followed by p then 3p. [It seems possible that we could see 2*a, 6*b, 3*p, p, 2*p. This does not happen in the first 10000 terms, but I can't prove it never happens. I can prove that every prime divides some term, and that the primes appear in increasing order. Conjecture 3 might be refuted by a more extensive calculation.]
LINKS
MAPLE
# To produce the first 1000 terms:
with(numtheory):
omega := proc(n) nops(numtheory[factorset](n)) end proc:
hit:=Array(1..100000, 0);
M:=100000;
a:=[1, 2]; K:=1; L:=2; hit[1]:=1; hit[2]:=2;
for n from 3 to 1000 do
sw1:=0;
# find a[n]
if factorset(L) subset factorset(K) then
# use EKG rule
for i from 1 to M do
if hit[i]=0 and igcd(i, L)>1 then a:=[op(a), i]; K:=L; L:=i; hit[i]:=n; sw1:=1; break; fi;
od:
if sw1=0 then error("failed EKG, n, i =", n, i); fi;
else
# use Enots Wolley rule
for i from 1 to M do
if hit[i]=0 and igcd(i, L)>1 and igcd(i, K)=1 then a:=[op(a), i]; K:=L; L:=i; hit[i]:=n; sw1:=1; break; fi;
od:
if sw1=0 then error("failed WOLLEY, n, i =", n, i); fi;
fi:
od:
a;
PROG
(Python)
from math import gcd
from itertools import count, islice
from sympy import primefactors
def A352187_gen(): # generator of terms
bset, blist, mmax = {1, 2}, [1, 2], 3
yield from blist
while True:
for m in count(mmax):
if gcd(m, blist[-1]) > 1 and m not in bset:
if all(blist[-2] % p == 0 for p in primefactors(blist[-1])) or gcd(m, blist[-2]) == 1:
yield m
blist = [blist[-1], m]
bset.add(m)
while mmax in bset:
mmax += 1
break
A352187_list = list(islice(A352187_gen(), 20)) # Chai Wah Wu, Mar 14 2022
CROSSREFS
Cf. A064413, A336957, A352188 (when n appears), A352189, A352190.
Records: A352191, A352192.
Sequence in context: A362015 A096665 A064413 * A357963 A357994 A357942
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 12 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 05:47 EDT 2024. Contains 375027 sequences. (Running on oeis4.)