login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A133517 Smallest k such that p(n)^3 - k is prime where p(n) is the n-th prime. 8
1, 4, 12, 6, 4, 18, 4, 2, 4, 10, 2, 2, 4, 14, 10, 4, 22, 38, 2, 28, 14, 12, 4, 22, 24, 4, 14, 24, 2, 10, 14, 4, 16, 12, 10, 2, 12, 30, 10, 16, 48, 18, 10, 20, 30, 42, 2, 14, 4, 26, 18, 10, 2, 10, 4, 4, 16, 12, 2, 34, 24, 58, 30, 4, 38, 6, 14, 14, 10, 12, 36, 6, 2, 24, 68, 4, 6, 26, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

EXAMPLE

p(4)=7, 7^3 = 343; for odd k and n > 1, p(n)^r - k is even and thus not prime, so we only need consider even k.

for k = 2: 343 - 2 = 341, which is 11 * 31 and not prime.

for k = 4: 343 - 4 = 339, which is 3 * 113, also not prime.

for k = 6: 343 - 6 = 337, which is prime, so 6 is the smallest number that can be subtracted from 343 to make another prime.

Hence a(4) = 6.

MATHEMATICA

sk[n_]:=With[{c=Prime[n]^3}, c-NextPrime[c, -1]]; Array[sk, 80] (* Harvey P. Dale, May 07 2019 *)

PROG

(PARI) a(n) = {k = 0; while (! isprime(prime(n)^3 - k), k++); return (k); } \\Michel Marcus, Aug 02 2013

CROSSREFS

Cf. A030078, A054271, A091666, A133518, A133519, A133520, A133521, A133522, (A001223).

Sequence in context: A203031 A336862 A190392 * A258565 A335914 A331054

Adjacent sequences:  A133514 A133515 A133516 * A133518 A133519 A133520

KEYWORD

easy,nonn

AUTHOR

Carl R. White, Sep 14 2007

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 October 1 04:06 EDT 2020. Contains 337441 sequences. (Running on oeis4.)