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.

A068527 Difference between smallest square >= n and n.

Original entry on oeis.org

0, 0, 2, 1, 0, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9
Offset: 0

Views

Author

Vladeta Jovovic, Mar 21 2002

Keywords

Comments

The greedy inverse (sequence of the smallest k such that a(k)=n) starts 0, 3, 2, 6, 5, 11, 10, 18, 17, 27, 26, 38, 37, 51, 50, ... and appears to be given by A010000 and A002522, interleaved. - R. J. Mathar, Nov 17 2014

Crossrefs

Bisections: A348596, A350962.

Programs

Formula

a(n) = A048761(n) - n = ceiling(sqrt(n))^2 - n.
G.f.: (-x^2 + (x-x^2)*Sum_{m>=1} (1+2*m)*x^(m^2))/(1-x)^2. This sum is related to Jacobi Theta functions. - Robert Israel, Nov 17 2014