OFFSET
1,1
COMMENTS
Exactly the numbers of the form p^{4k+1}*m^2 with p a prime congruent to 1 modulo 4 and m a positive integer coprime with p. The odd perfect numbers are all of this form.
See A228058 for the terms where m > 1. - Antti Karttunen, Apr 22 2019
LINKS
EXAMPLE
For n=3 one has a(3)=17 since sigma(17) = 18 = 4*4 +2 is congruent to 2 modulo 4
MAPLE
with(numtheory): genodd := proc(b) local n, s, d; for n from 1 to b by 2 do s := sigma(n);
if modp(s, 4)=2 then print(n); fi; od; end;
MATHEMATICA
Select[Range[1, 501, 2], Mod[DivisorSigma[1, #], 4]==2&] (* Harvey P. Dale, Nov 12 2017 *)
PROG
(PARI) forstep(n=1, 10^3, 2, if(2==(sigma(n)%4), print1(n, ", "))) \\ Joerg Arndt, May 27 2011
(PARI) list(lim)=my(v=List()); forstep(e=1, logint(lim\=1, 5), 4, forprimestep(p=5, sqrtnint(lim, e), 4, my(pe=p^e); forstep(m=1, sqrtint(lim\pe), 2, if(m%p, listput(v, pe*m^2))))); Set(v) \\ Charles R Greathouse IV, Feb 16 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luis H. Gallardo, May 26 2011
STATUS
approved