OFFSET
1,1
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
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 19 2006
EXTENSIONS
Data corrected and more terms added by Amiram Eldar, Sep 11 2021
STATUS
approved