login
This site is supported by donations 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

Table of n, a(n) for n=1..12.

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

Cf. A100361, A100362.

Sequence in context: A156215 A058490 A299578 * A136917 A181890 A048712

Adjacent sequences:  A308826 A308827 A308828 * A308830 A308831 A308832

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 10:24 EDT 2019. Contains 328317 sequences. (Running on oeis4.)