cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A375166 Nonsquares congruent to {0, 1, 4, 7} modulo 9.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Aug 05 2024

Keywords

Comments

Squares are congruent to {0, 1, 4, 7} modulo 9, but the reverse is not always true since there are nonsquares that have the same congruence property. See Beiler.

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 140.

Crossrefs

Intersection of A000037 and A056991.

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