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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061023 Difference between the closest square and the closest cube to n. 4
0, 0, 0, 3, 3, 4, 4, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 11, 11, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 22, 22, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

a(A201217(n)) = 0.

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

FORMULA

a(n) = abs(A053187(n) - A201053(n)). [Reinhard Zumkeller, Nov 28 2011]

EXAMPLE

a(46)=15 because the nearest square is 49 and the nearest cube is 64 and 64 - 49 = 15.

MATHEMATICA

dsc[n_]:=Module[{s=Floor[Sqrt[n]], c=Floor[Power[n, (3)^-1]], ns, nc}, ns= Nearest[{s^2, (s+1)^2}, n]; nc=Nearest[{c^3, (c+1)^3}, n]; Abs[nc-ns]]; Flatten[ Array[dsc, 100, 0]] (* Harvey P. Dale, Aug 19 2011 *)

PROG

(PARI) { for (n=0, 10000, x=n^(1/2); s=floor(x)^2; t=ceil(x)^2; if (n-s > t-n, s=t); x=n^(1/3); c=floor(x)^3; d=ceil(x)^3; if (n-c > d-n, c=d); write("b061023.txt", n, " ", abs(c-s)) ) } \\ Harry J. Smith, Jul 16 2009

(Haskell)

a061023 n = abs (a053187 n - a201053 n)

a061023_list = map a061023 [0..]

-- Reinhard Zumkeller, Nov 28 2011

CROSSREFS

Cf. A000290, A000578.

Sequence in context: A027011 A267048 A246011 * A057690 A318706 A298199

Adjacent sequences:  A061020 A061021 A061022 * A061024 A061025 A061026

KEYWORD

easy,nice,nonn,look

AUTHOR

Hareendra Yalamanchili (hyalaman(AT)mit.edu), May 24 2001

EXTENSIONS

More terms from Harvey P. Dale, Aug 19 2011

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 January 19 20:22 EST 2019. Contains 319310 sequences. (Running on oeis4.)