login

Revision History for A047973

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Distance of n-th prime to nearest cube.
(history; published version)
#9 by Harvey P. Dale at Wed Jan 11 13:53:37 EST 2017
STATUS

editing

approved

#8 by Harvey P. Dale at Wed Jan 11 13:53:31 EST 2017
LINKS

Harvey P. Dale, <a href="/A047973/b047973.txt">Table of n, a(n) for n = 1..1000</a>

MATHEMATICA

dnc[n_]:=Module[{c=Surd[n, 3]}, Min[Ceiling[c]^3-n, n-Floor[c]^3]]; dnc/@ Prime[Range[80]] (* Harvey P. Dale, Jan 11 2017 *)

STATUS

approved

editing

#7 by Joerg Arndt at Thu Jun 05 13:53:38 EDT 2014
STATUS

proposed

approved

#6 by Michel Marcus at Thu Jun 05 12:31:48 EDT 2014
STATUS

editing

proposed

#5 by Michel Marcus at Thu Jun 05 12:31:45 EDT 2014
PROG

(PARI) a(n) = {p = prime(n); sc = sqrtnint(p, 3); min(p - sc^3, (sc+1)^3 - p); } \\ Michel Marcus, Jun 05 2014

STATUS

approved

editing

#4 by Russ Cox at Sat Mar 31 10:32:38 EDT 2012
AUTHOR

Enoch Haga (Enokh(AT)comcast.net)

Enoch Haga

Discussion
Sat Mar 31
10:32
OEIS Server: https://oeis.org/edit/global/789
#3 by N. J. A. Sloane at Sun Feb 20 03:00:00 EST 2005
KEYWORD

easy,nonn,new

AUTHOR

Enoch Haga (Enokh(AT)aolcomcast.comnet)

#2 by N. J. A. Sloane at Fri May 16 03:00:00 EDT 2003
NAME

Distance of nth n-th prime to nearest cube.

KEYWORD

easy,nonn,new

AUTHOR

Enoch Haga (EnochHaga@msnEnokh(AT)aol.com)

#1 by N. J. A. Sloane at Sat Dec 11 03:00:00 EST 1999
NAME

Distance of nth prime to nearest cube.

DATA

1, 2, 3, 1, 3, 5, 9, 8, 4, 2, 4, 10, 14, 16, 17, 11, 5, 3, 3, 7, 9, 15, 19, 25, 28, 24, 22, 18, 16, 12, 2, 6, 12, 14, 24, 26, 32, 38, 42, 43, 37, 35, 25, 23, 19, 17, 5, 7, 11, 13, 17, 23, 25, 35, 41, 47, 53, 55, 61, 62, 60, 50, 36, 32, 30, 26, 12, 6, 4, 6, 10, 16, 24, 30, 36, 40

OFFSET

1,2

FORMULA

For each prime, find the closest cube (preceding or succeeding); subtract, take absolute value.

EXAMPLE

For 179, 125 is the preceding cube, 216 is the succeeding. 179-125 = 54, 216-179 = 37, so the distance is 37.

CROSSREFS

Cf. A047972.

KEYWORD

easy,nonn

AUTHOR

Enoch Haga ([email protected])

STATUS

approved