OFFSET
1,1
COMMENTS
From Gordon Atkinson, Aug 20 2019: (Start)
For all odd numbers n > 3, a(n) is even.
For all odd numbers n > 1, a(n^2) = 0. (End)
a(37) > 10^4. - Jinyuan Wang, Mar 05 2020
From Kevin P. Thompson, Feb 12 2023: (Start)
Other known terms: a(38) = 1, a(39) = 6, a(40) = 6, a(41) = 2, a(42) = 1, a(44) = 8, a(45) = 22, a(47) = 48, a(48) = 7, a(49) = 0, a(50) = 14.
Other unknown terms: a(43) > 5000, a(46) > 1000, a(51) > 1000. (End)
FORMULA
a(A008864(k)) = 1. - Gordon Atkinson, Sep 04 2019
EXAMPLE
The least k > 0 such that 5*k^k - 1 is a prime is k = 2, so a(5) = 2.
MATHEMATICA
Table[If[And[n > 1, OddQ@ Sqrt@ n], 0, If[And[n > 3, OddQ@ n], Block[{k = 2}, While[! PrimeQ[n*k^k - 1], k += 2]; k], Block[{k = 1}, While[! PrimeQ[n*k^k - 1], k++]; k]]], {n, 36}] (* Michael De Vlieger, Sep 29 2019 *)
PROG
(PARI) a(n) = if(sqrt(n)%2==1 && n>1, 0, for(k=1, oo, if(ispseudoprime(n*k^k-1), return(k)))); \\ Jinyuan Wang, Mar 05 2020
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Alex Ratushnyak, Nov 12 2013
EXTENSIONS
a(9) and a(25) from Gordon Atkinson, Aug 20 2019
a(26)-a(36) from Alois P. Heinz, Aug 20 2019
STATUS
approved