A100829 Numbers that are a sum of two nonzero squares and not divisible by 17.
2, 5, 8, 10, 13, 18, 20, 25, 26, 29, 32, 37, 40, 41, 45, 50, 52, 53, 58, 61, 65, 72, 73, 74, 80, 82, 89, 90, 97, 98, 100, 101, 104, 106, 109, 113, 116, 117, 122, 125, 128, 130, 137, 145, 146, 148, 149, 157, 160, 162, 164, 169, 173, 178, 180, 181, 185, 193, 194, 197
Offset: 1
Keywords
Programs
-
Maple
filter:= proc(x) local F; if x mod 17 = 0 then return false fi; F:= ifactors(x)[2]; if ormap(t -> t[1] mod 4 = 3 and t[2]::odd, F) then return false fi; ormap(t -> t[1] mod 4 = 1 or (t[1]=2 and t[2]::odd), F) end proc: select(filter, [$1..200]); # Robert Israel, Jun 17 2025
-
Mathematica
With[{upto=200},Select[Total/@Tuples[Range[Ceiling[Sqrt[upto]]]^2,2], Mod[ #,17]!=0&<=upto&]]//Union (* Harvey P. Dale, May 18 2019 *)
Extensions
Definition corrected by Robert Israel, Jun 17 2025