OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..5300
PROG
(Python)
from itertools import count, islice
from math import prod
from sympy import factorint
def A124979_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
f = factorint(n)
if n%5 and 1<int(not any(e&1 for e in f.values())) + (((m:=prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in f.items()))+((((~n & n-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1):
yield n
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Nov 15 2006
EXTENSIONS
Corrected and extended by M. F. Hasler, Feb 08 2009
Further corrections following an observation by P. McNab, by M. F. Hasler, Jul 08 2015
STATUS
approved