OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
n is in this sequence iff either n is congruent to 2 modulo 4 or n and Omega(n) are both odd. - Charlie Neder, Feb 25 2019
MATHEMATICA
ader[n_] := ader[n] = Switch[n, 0|1, 0, _, If[PrimeQ[n], 1,
Sum[Module[{p, e}, {p, e} = pe; n e/p], {pe, FactorInteger[n]}]]];
Select[Range[120], OddQ[ader[#]]&] (* Jean-François Alcover, Oct 10 2021 *)
PROG
(Haskell)
a235991 n = a235991_list !! (n-1)
a235991_list = filter (odd . a003415) [0..]
(Python)
from itertools import count, islice
from sympy import factorint
def A235991_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda n: n&3==2 or (n&1 and sum(factorint(n).values())&1), count(max(startvalue, 0)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 11 2014
STATUS
approved