A191218 Odd numbers n such that sigma(n) is congruent to 2 modulo 4.
5, 13, 17, 29, 37, 41, 45, 53, 61, 73, 89, 97, 101, 109, 113, 117, 137, 149, 153, 157, 173, 181, 193, 197, 229, 233, 241, 245, 257, 261, 269, 277, 281, 293, 313, 317, 325, 333, 337, 349, 353, 369, 373, 389, 397, 401, 405, 409, 421, 425, 433, 449, 457, 461, 477
Offset: 1
Examples
For n=3 one has a(3)=17 since sigma(17) = 18 = 4*4 +2 is congruent to 2 modulo 4
Links
Crossrefs
Programs
-
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 *)
-
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
Comments