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.

A046711 From the Bruck-Ryser theorem: numbers n == 1 or 2 (mod 4) which are also the sum of 2 squares.

Original entry on oeis.org

1, 2, 5, 9, 10, 13, 17, 18, 25, 26, 29, 34, 37, 41, 45, 49, 50, 53, 58, 61, 65, 73, 74, 81, 82, 85, 89, 90, 97, 98, 101, 106, 109, 113, 117, 121, 122, 125, 130, 137, 145, 146, 149, 153, 157, 162, 169, 170, 173, 178, 181, 185, 193, 194, 197, 202, 205, 218, 221, 225
Offset: 1

Views

Author

Keywords

Comments

Intersection of A001481 and A042963; A000161(a(n)) > 0. - Reinhard Zumkeller, Feb 14 2012

References

  • M. Hall, Jr., Combinatorial Theory, Theorem 12.3.2.

Crossrefs

Programs

  • Haskell
    a046711 n = a046711_list !! (n-1)
    a046711_list = [x | x <- a042963_list, a000161 x > 0]
    -- Reinhard Zumkeller, Aug 16 2011
    
  • Mathematica
    max = 225; Flatten[ Table[ a^2 + b^2, {a, 0, Sqrt[max]}, {b, a, Sqrt[max - a^2]}], 1] // Union // Select[#, (1 <= Mod[#, 4] <= 2)& ]& (* Jean-François Alcover, Sep 13 2012 *)
    With[{max=15},Select[Select[Total/@Tuples[Range[0,max]^2,2], MemberQ[ {1,2}, Mod[ #,4]]&]//Union,#<=max^2&]] (* Harvey P. Dale, Jan 14 2017 *)
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A046711_gen(): # generator of terms
        return filter(lambda n:0 < n & 3 < 3 and all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items()),count(0))
    A046711_list = list(islice(A046711_gen(),30)) # Chai Wah Wu, Jun 28 2022

Extensions

More terms from James Sellers