This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A239676 Least k such that k*3^n+1 is prime. 2
 1, 2, 2, 4, 2, 2, 2, 8, 6, 2, 8, 28, 10, 12, 4, 4, 2, 2, 10, 20, 26, 24, 8, 48, 16, 34, 14, 14, 18, 6, 2, 26, 26, 14, 22, 26, 16, 22, 12, 4, 62, 64, 68, 88, 70, 56, 34, 96, 32, 50, 20, 24, 8, 6, 2, 18, 6, 2, 8, 6, 2, 42, 14, 18, 6, 2, 98, 66, 22, 70, 74, 80, 68, 52 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS All numbers in this sequence, except for a(0), are even. LINKS Marius A. Burtea, Table of n, a(n) for n = 0..1000 EXAMPLE 1*3^1+1 = 4 is not prime. 2*3^1+1 = 7 is prime. Thus, a(1) = 2. 1*3^3+1 = 28 is not prime. 2*3^3+1 = 57 is not prime. 3*3^3+1 = 82 is not prime. 4*3^3+1 = 109 is prime. Thus, a(3) = 4. PROG (Python) import sympy from sympy import isprime def Pow3(n): ..for k in range(10**4): ....if isprime(k*(3**n)+1): ......return n n = 1 while n < 100: ..print(Pow3(n)) ..n += 1 (PARI) for(n=0, 100, k=0; while(!isprime(k*3^n+1), k++); print1(k, ", ")) \\ Colin Barker, Mar 24 2014 (MAGMA) sol:=[]; m:=1; for n in [0..73] do k:=0; while not IsPrime(k*3^n+1) do k:=k+1; end while; sol[m]:=k; m:=m+1; end for; sol; // Marius A. Burtea, Jun 05 2019 CROSSREFS Cf. A003306 (where k=2), A035050 (k*2^n+1 is prime). Sequence in context: A077636 A215847 A057000 * A295639 A182982 A090047 Adjacent sequences:  A239673 A239674 A239675 * A239677 A239678 A239679 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 19 03:54 EDT 2019. Contains 325144 sequences. (Running on oeis4.)