The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A216217 Smallest k such that 6^n - 2*k*3^n - 1 and 6^n - 2*k*3^n + 1 are twin primes or 0 if no solution, n > 1. 1
 1, 2, 3, 0, 3, 11, 33, 9, 26, 6, 34, 138, 51, 19, 33, 246, 66, 31, 167, 73, 13, 716, 138, 148, 138, 339, 447, 41, 131, 41, 9, 178, 778, 337, 543, 2154, 213, 1216, 454, 183, 678, 442, 157, 381, 297, 1476, 54, 1201, 1942, 1566, 572, 3708, 3261, 3672, 1087, 306 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 COMMENTS Conjecture: there is only one zero term: a(5) = 0. The PFGW script computes 2*a(n). LINKS Pierre CAMI, Table of n, a(n) for n = 2..400 EXAMPLE 6^2 - 2*1*3^2 - 1 = 17, 17 and 19 twin primes so a(2)=1. 6^3 - 2*2*3^3 - 1 = 107, 107 and 109 twin primes so a(3)=2. 6^4 - 2*3*3^4 - 1 = 809, 809 and 811 twin primes so a(4)=3. 6^5 - 2*k*3^5 - 1 and 6^5 - 2*k*3^5 + 1 for k=1 to 30 have no twin prime solution so a(5)=0. MATHEMATICA Table[k = 0; While[k++; p = 6^n - 2*k*3^n - 1; p > 0 && ! (PrimeQ[p] && PrimeQ[p + 2])]; If[p <= 0, 0, k], {n, 2, 50}] (* T. D. Noe, Mar 15 2013 *) PROG (PFGW & Scriptify) PFGW64 -lout.txt -f in.txt in.txt file : SCRIPT DIM k DIM n, 1 DIMS t LABEL loop1 SET n, n+1 IF n>400 THEN END SET k, 0 LABEL loop2 SET k, k+2 SETS t, %d, %d\,; n; k PRP 6^n-k*3^n-1, t IF ISPRP THEN GOTO a GOTO loop2 LABEL a SETS t, %d, %d\,; n; k PRP 6^n-k*3^n+1, t IF ISPRP THEN GOTO loop1 GOTO loop2 CROSSREFS Cf. A205322 (similar, but powers of 2). Sequence in context: A180188 A316607 A194365 * A253283 A261719 A137663 Adjacent sequences: A216214 A216215 A216216 * A216218 A216219 A216220 KEYWORD nonn AUTHOR Pierre CAMI, Mar 13 2013 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.

Last modified May 20 19:00 EDT 2024. Contains 372720 sequences. (Running on oeis4.)