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!)
A308829 Numbers k such that 3^k - k + 1 is prime. 0
0, 1, 5, 27, 45, 47, 75, 8895, 11405, 29517, 84615, 218307 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Sieving can be limited to odd values of k, because 3^k - k + 1 is even when k is even. In fact, if k is even, 3^k - k is odd and the successor is even.
LINKS
MATHEMATICA
ListA[k_] := Block[{seq = {}, n = 0, i = 0}, While[Length[seq] < k, {n = 3^i - i + 1, If[PrimeQ[n], AppendTo[seq, i]], i += 1}]; seq]
PROG
(Sage)
def list_a(k):
return [i for i in range(k) if (3**i) - i + 1 in Primes()]
(PARI) isok(k) = isprime(3^k - k + 1); \\ Jinyuan Wang, Aug 03 2019
CROSSREFS
Sequence in context: A156215 A058490 A299578 * A136917 A181890 A048712
KEYWORD
nonn,hard,more
AUTHOR
Giuseppe Bonaccorso, Aug 02 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 17:10 EDT 2024. Contains 371962 sequences. (Running on oeis4.)