A375166 Nonsquares congruent to {0, 1, 4, 7} modulo 9.
7, 10, 13, 18, 19, 22, 27, 28, 31, 34, 37, 40, 43, 45, 46, 52, 54, 55, 58, 61, 63, 67, 70, 72, 73, 76, 79, 82, 85, 88, 90, 91, 94, 97, 99, 103, 106, 108, 109, 112, 115, 117, 118, 124, 126, 127, 130, 133, 135, 136, 139, 142, 145, 148, 151, 153, 154, 157, 160, 162
Offset: 1
References
- Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 140.
Programs
-
Mathematica
Select[Range[0,162], !IntegerQ[Sqrt[#]] && MemberQ[{0,1,4,7}, Mod[#,9]] &]
-
Python
from itertools import count, islice from sympy.ntheory.primetest import is_square def A375166_gen(): # generator of terms for i in count(0,9): for j in (0,1,4,7): if not is_square(i+j): yield i+j A375166_list = list(islice(A375166_gen(),40)) # Chai Wah Wu, Jun 05 2025
Comments