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.

A277191 Number of integers k in range [n^2, ((n+1)^2)-1] for which the least number of squares that add up to k (A002828) is odd.

Original entry on oeis.org

0, 2, 2, 4, 5, 5, 7, 7, 9, 10, 10, 13, 12, 15, 16, 15, 18, 19, 20, 20, 24, 21, 25, 26, 26, 27, 30, 30, 31, 33, 33, 33, 37, 37, 38, 40, 42, 41, 43, 44, 46, 46, 48, 47, 51, 50, 51, 55, 53, 56, 57, 58, 61, 61, 64, 61, 63, 66, 69, 65, 68, 71, 73, 70, 74, 75, 76, 77, 79, 79, 81, 85, 80, 86, 85, 85, 89, 90, 91, 91, 92, 95, 95, 98, 95, 100
Offset: 0

Views

Author

Antti Karttunen, Oct 04 2016

Keywords

Crossrefs

After the initial zero, one more than A277193.

Programs

  • Scheme
    (define (A277191 n) (add (lambda (i) (A000035 (A002828 i))) (A000290 n) (+ -1 (A000290 (+ 1 n)))))
    ;; Implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

a(n) = Sum_{i=n^2 .. ((n+1)^2)-1} A000035(A002828(i)).
For all n >= 0, a(n) + A277192(n) = 2n+1.
For all n >= 1, a(n) = 1 + A277193(n).