login
A118925
a(n) is the least prime p such that n*((p#)^5)-1 is prime, or 0 if n > 1 is a 5th power so no prime possible.
1
2, 3, 3, 2, 347, 2, 2, 3, 389, 29, 13, 2, 7, 3, 2, 269, 1091, 3, 2, 5, 67, 337, 11, 5, 31, 5, 2, 3, 3, 3, 2, 0, 131, 2, 5, 2, 71, 389, 229, 2, 29, 109, 43, 3, 2, 2, 3, 137, 2, 5, 47, 2, 3, 7, 2, 163, 2, 397, 2767, 13, 2, 5, 3, 3, 73, 2, 2, 13, 2, 2, 23, 29, 733, 5, 2, 607, 5, 3, 7, 5, 2, 17
OFFSET
1,1
EXAMPLE
1*(2^5)-1 = 31, 31 is prime, so a(1) = 2.
2*((2*3)^5)-1 = 15551, 15551 is prime, so a(2) = 3.
3*((2*3)^5)-1 = 23327, 23327 is prime, so a(3) = 3.
MATHEMATICA
a[n_] := If[n > 1 && IntegerQ[Surd[n, 5]], 0, Module[{p = pr = 2}, While[! PrimeQ[n*pr^5 - 1], p = NextPrime[p]; pr *= p]; p]]; Array[a, 100] (* Amiram Eldar, Sep 11 2021 *)
CROSSREFS
Cf. A118664 (with squares), A118665 (with cubes).
Sequence in context: A153592 A351188 A153878 * A308100 A351065 A171576
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 25 2006
EXTENSIONS
Data corrected by Amiram Eldar, Sep 11 2021
STATUS
approved