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!)
A231735 Least positive k such that n*k^k - 1 is a prime, or 0 if no such k exists. 3
2, 2, 1, 1, 2, 1, 1128, 1, 0, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 14, 1, 0, 2, 2, 6, 206, 1, 1590, 1, 2, 11, 2, 3 (list; graph; refs; listen; history; text; internal format)
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)
LINKS
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
Sequence in context: A209332 A020945 A231734 * A016429 A131852 A139352
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

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 April 24 19:31 EDT 2024. Contains 371962 sequences. (Running on oeis4.)