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!)
A057160 Smallest value of k for which the expression k*2^(2^n-1)-1 is prime. 0
3, 2, 1, 1, 4, 1, 6, 1, 90, 111, 244, 139, 880, 309, 22263, 56083, 130141, 49905 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = A053989(A058891(n+1)). - Pontus von Brömssen, May 27 2022
EXAMPLE
a(1)=2 because 2*2^(2^1-1)-1 = 2*2^1-1 = 3 which is prime. - Sean A. Irvine, May 25 2022
a(4)=4 because 4*2^(2^4-1)-1 = 4*2^15-1 = 4*32768-1 = 131071 which is prime.
MATHEMATICA
svk[n_]:= Module[{k = 1, c = 2^(2^n-1)}, While[!PrimeQ[k*c-1], k++]; k]; Join[{2}, svk /@ Range[17]] (* Harvey P. Dale, Feb 03 2021, adjusted for new offset by Michael De Vlieger, May 25 2022 *)
PROG
(Python)
from sympy import isprime
def a(n):
k, c = 1, 2**(2**n-1)
while not isprime(k*c - 1): k += 1
return k
print([a(n) for n in range(1, 12)]) # Michael S. Branicky, May 25 2022
(PARI) a(n) = my(k=1); while (!isprime(k*2^(2^n-1)-1), k++); k; \\ Michel Marcus, May 27 2022
CROSSREFS
Cf. A053989, A058891, A077585 (2^(2^n-1)-1).
Sequence in context: A143772 A053989 A342459 * A239938 A097794 A275494
KEYWORD
nonn,more
AUTHOR
Steven Harvey, Sep 14 2000
EXTENSIONS
Offset and a(1) corrected by Sean A. Irvine, May 25 2022
a(0) prepended by Michel Marcus, May 27 2022
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 March 19 01:57 EDT 2024. Contains 370952 sequences. (Running on oeis4.)