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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104148 Difference between n^3 and largest m less than n^3, where m > 0 is either a prime or a square. 1
1, 2, 3, 4, 5, 6, 3, 2, 3, 4, 5, 18, 3, 2, 3, 4, 5, 2, 7, 4, 9, 4, 17, 6, 3, 2, 9, 10, 7, 2, 7, 4, 3, 12, 7, 2, 3, 38, 3, 4, 11, 14, 25, 4, 9, 10, 5, 6, 9, 4, 5, 4, 7, 12, 15, 4, 9, 22, 17, 38, 7, 4, 5, 16, 5, 2, 9, 28, 11, 28, 17, 14, 3, 28, 9, 4, 5, 12, 3, 58, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 2..1000

FORMULA

a(n) < 2n^(3/2) - 1. Conjecturally a(n) << log^2 n. - Charles R Greathouse IV, Jun 03 2013

EXAMPLE

a(5) = 4 because largest square less than 5^3 is 121 and 125 - 121 = 4.

MATHEMATICA

lst = {}; Do[k = n^3; a = NextPrime[k, -1]; b = Floor@Sqrt[k - 1]^2; AppendTo[lst, k - Max[a, b]], {n, 2, 82}]; lst (* Arkadiusz Wesolowski, Jun 03 2013 *)

PROG

(MAGMA) [n^3-Maximum(Isqrt(n^3-1)^2, PreviousPrime(n^3)): n in [2..100]]; // Bruno Berselli, Jun 03 2013

(PARI) a(n)=n^3-max(sqrtint(n^3-1)^2, precprime(n^3)) \\ Charles R Greathouse IV, Jun 03 2013

CROSSREFS

Sequence in context: A203580 A043266 A082120 * A286450 A245344 A323074

Adjacent sequences:  A104145 A104146 A104147 * A104149 A104150 A104151

KEYWORD

nonn,easy

AUTHOR

Giovanni Teofilatto, Mar 08 2005

EXTENSIONS

Offset corrected by Michel Marcus, Jun 03 2013

Edited, corrected and extended by Arkadiusz Wesolowski, Jun 03 2013

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 March 26 04:32 EDT 2019. Contains 321481 sequences. (Running on oeis4.)