login
A080883
Distance of n to next square.
10
1, 3, 2, 1, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 19, 18, 17, 16, 15, 14, 13
OFFSET
0,2
COMMENTS
The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446, A080883. - Jeremy Gardiner, Dec 30 2006
LINKS
FORMULA
a(n) = floor( sqrt(n)+1 )^2 - n.
MAPLE
A080883 := proc(n) (floor(sqrt(n)+1))^2 -n ; end: seq( A080883(n), n=0..40) ; # R. J. Mathar, Aug 08 2009
MATHEMATICA
Table[Floor[1+Sqrt[n]]^2 -n, {n, 0, 90}] (* G. C. Greubel, Nov 07 2019 *)
PROG
(PARI) a(n) = (sqrtint(n)+1)^2-n; \\ Michel Marcus, May 22 2024
(Magma) [Floor(1+Sqrt(n))^2 -n: n in [0..90]]; // G. C. Greubel, Nov 07 2019
(Sage) [floor(1+sqrt(n))^2 -n for n in (0..90)] # G. C. Greubel, Nov 07 2019
(GAP) List([0..90], n-> Int(1+RootInt(n))^2 -n); # G. C. Greubel, Nov 07 2019
CROSSREFS
Cf. A075555.
Cf. A066635, A053188. - R. J. Mathar, Aug 08 2009
Sequence in context: A309219 A019587 A102427 * A021315 A337315 A068389
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Mar 29 2003
STATUS
approved