login
Squarefree kernel of A090252(n) (cf. A007947).
2

%I #10 Jun 19 2022 02:16:30

%S 1,2,3,5,2,7,3,11,13,17,2,19,23,5,21,29,31,37,41,43,47,53,2,59,61,67,

%T 71,73,55,79,3,7,83,89,97,101,103,107,109,113,127,131,137,139,149,151,

%U 26,157,163,167,173,179,181,191,193,197,199,211,85,11,223,227,57,229,161,233,239,241,251,257,263,269,271,277,281

%N Squarefree kernel of A090252(n) (cf. A007947).

%o (Python)

%o from itertools import count, islice

%o from math import prod, gcd, lcm

%o from collections import deque

%o from sympy import primefactors

%o def A354764_gen(): # generator of terms

%o aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True

%o yield 1

%o while True:

%o for m in count(c):

%o if m not in aset and gcd(m,b) == 1:

%o yield prod(primefactors(m))

%o aset.add(m)

%o aqueue.append(m)

%o if f: aqueue.popleft()

%o b = lcm(*aqueue)

%o f = not f

%o while c in aset:

%o c += 1

%o break

%o A354764_list = list(islice(A354764_gen(),20)) # _Chai Wah Wu_, Jun 18 2022

%Y Cf. A007947, A090252.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Jun 18 2022