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!)
A239677 Least numbers k such that k*3^n-1 is prime. 0
1, 2, 2, 8, 4, 6, 2, 2, 16, 8, 6, 2, 16, 10, 4, 14, 8, 18, 6, 2, 18, 6, 2, 20, 18, 6, 2, 38, 30, 10, 16, 20, 18, 6, 2, 60, 20, 10, 10, 40, 58, 48, 16, 12, 4, 32, 90, 30, 10, 8, 130, 62, 26, 10, 6, 2, 30, 10, 32, 18, 6, 2, 74, 28, 46, 18, 6, 2, 30, 10, 46, 80, 94, 52 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

All the numbers in this sequence, excluding a(1), are even.

LINKS

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

EXAMPLE

1*3^2-1 = 8 is not prime. 2*3^2-1 = 17 is prime. Thus, a(2) = 2.

1*3^5-1 = 242 is not prime. 2*3^5-1 = 485 is not prime. 3*3^5-1 = 728 is not prime. 4*3^5-1 = 971 is prime. Thus, a(5) = 4.

PROG

(Python)

import sympy

from sympy import isprime

def Pow_3(n):

..for k in range(10**4):

....if isprime(k*(3**n)-1):

......return n

n = 1

while n < 100:

..print(Pow_3(n))

..n += 1

(PARI)

for(n=1, 100, k=0; while(!isprime(k*3^n-1), k++); print1(k, ", ")) \\ Colin Barker, Mar 24 2014

CROSSREFS

Cf. A085427.

Sequence in context: A195361 A274041 A049331 * A331333 A120399 A144816

Adjacent sequences:  A239674 A239675 A239676 * A239678 A239679 A239680

KEYWORD

nonn

AUTHOR

Derek Orr, Mar 23 2014

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 September 26 23:44 EDT 2022. Contains 357051 sequences. (Running on oeis4.)