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.

A228587 Sum of the squares (modulo n) of the odd numbers less than n.

Original entry on oeis.org

0, 1, 1, 2, 5, 5, 7, 4, 12, 25, 22, 22, 39, 49, 35, 40, 68, 69, 76, 50, 91, 77, 92, 44, 125, 169, 144, 182, 203, 205, 186, 208, 242, 289, 245, 210, 333, 285, 286, 180, 410, 413, 430, 374, 420, 529, 423, 376, 490, 625, 578, 546, 689, 585, 605, 476, 760, 841, 767, 710
Offset: 1

Views

Author

R. J. Mathar, Aug 27 2013

Keywords

Comments

Sum over the odd-numbered columns in row n of A048152.

Crossrefs

Cf. A000447.

Programs

  • Maple
    A228587 := proc(n)
            local a,o ;
            a := 0 ;
            for o from 1 to n-1 by 2 do
                    a := a+ modp(o^2,n) ;
            end do:
            a ;
    end proc:

Formula

a(n) = sum_{k=1,3,5,...,n-1} (k^2 mod n).
a(n) <= A048153(n).
A187468(n) = a(2^n).