login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118665 a(n) is the least prime p such that n*(p#^3)-1 is prime or 0 if n > 1 is a cube so no prime possible. 1
2, 3, 2, 2, 5, 2, 3, 0, 2, 2, 59, 3, 2, 3, 11, 2, 3, 19, 2, 401, 2, 3, 3, 2, 2, 7, 0, 2, 3, 2, 13, 3, 2, 2, 3, 7, 7, 11, 2, 5, 5, 17, 7, 5, 2, 2, 3, 2, 31, 3, 13, 257, 3, 2, 2, 5, 41, 2, 3, 2, 2, 31, 2, 0, 3359, 47, 19, 31, 17, 5, 13, 3, 3, 5, 2, 2, 3, 41, 2, 31 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
1*(2^3)-1 = 7 is prime, so a(1) = 2.
2*(2^3)-1 = 15 is composite, 2*((2*3)^3)-1 = 431 is prime, so a(2) = 3.
MATHEMATICA
a[n_] := If[n>1 && IntegerQ[Surd[n, 3]], 0, Module[{p = pr = 2}, While[!PrimeQ[n * pr^3 - 1], p = NextPrime[p]; pr *= p]; p]]; Array[a, 100] (* Amiram Eldar, Sep 11 2021 *)
PROG
(PARI) pr(p) = my(pr=1); forprime(q=2, p, pr *= q); pr;
a(n) = if (ispower(n, 3) && (n>1), return (0)); my(p=2); while (!ispseudoprime(n*pr(p)^3-1), p = nextprime(p+1)); p; \\ Michel Marcus, Sep 11 2021
CROSSREFS
Cf. A118664 (with squares), A118925 (with 5th powers).
Sequence in context: A225176 A349271 A349387 * A333238 A336526 A225243
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 19 2006
EXTENSIONS
Data corrected and more terms added by Amiram Eldar, Sep 11 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 19:26 EDT 2024. Contains 372341 sequences. (Running on oeis4.)