login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249142 Let k be the difference between the smallest square >= n and n. Sequence gives difference between the smallest square >= k and k. 2
0, 2, 0, 0, 0, 1, 2, 0, 0, 3, 4, 0, 1, 2, 0, 0, 1, 2, 3, 4, 0, 1, 2, 0, 0, 6, 0, 1, 2, 3, 4, 0, 1, 2, 0, 0, 4, 5, 6, 0, 1, 2, 3, 4, 0, 1, 2, 0, 0, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 0, 1, 2, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 0, 1, 2, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 0, 1, 2, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Equals A068527 applied to itself.

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..5000

FORMULA

a(n) = A068527(A068527(n)).

a(n) = n - ceiling(sqrt(n))^2 + ceiling(sqrt(-n+ceiling(sqrt(n))^2))^2.

a(n) < (64n)^(1/4). - Charles R Greathouse IV, Oct 22 2014

EXAMPLE

For n = 13 the next biggest square is 16, thus k = 16 - 13 = 3 and for 3 the next biggest square is 4, thus a(14) = 3 - 2 = 1.

MAPLE

A068527:= n -> ceil(sqrt(n))^2 - n:

map(A068527@@2, [$1..100]); # Robert Israel, Nov 02 2017

MATHEMATICA

Table[n - Ceiling[Sqrt[n]]^2 + Ceiling[Sqrt[-n + Ceiling[Sqrt[n]]^2]]^2, {n, 1, 100}]

PROG

(PARI) A068527(n)=if(issquare(n), 0, (sqrtint(n)+1)^2-n)

a(n)=A068527(A068527(n)) \\ Charles R Greathouse IV, Oct 22 2014

(MAGMA) [n - Ceiling(Sqrt(n))^2 + Ceiling(Sqrt(-n+Ceiling(Sqrt(n))^2))^2: n  in [1..100]]; // Vincenzo Librandi, Oct 23 20124

CROSSREFS

Cf. A068527.

Sequence in context: A248509 A281542 A191410 * A225099 A174806 A089605

Adjacent sequences:  A249139 A249140 A249141 * A249143 A249144 A249145

KEYWORD

nonn,easy

AUTHOR

Valtteri Raiko, Oct 22 2014

EXTENSIONS

Edited, old crossrefs entry moved to Comments, and first two formula lines interchanged by Wolfdieter Lang, Nov 10 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:03 EDT 2019. Contains 322430 sequences. (Running on oeis4.)