cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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
Offset: 2

Views

Author

Pierre CAMI, Mar 13 2013

Keywords

Comments

Conjecture: there is only one zero term: a(5) = 0.
The PFGW script computes 2*a(n).

Examples

			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.
		

Crossrefs

Cf. A205322 (similar, but powers of 2).

Programs

  • 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 *)