A180133 Smallest k such that k*6^n is a sum of two successive primes.
5, 2, 1, 1, 4, 12, 2, 1, 4, 3, 5, 8, 7, 34, 8, 11, 33, 26, 13, 9, 13, 90, 15, 40, 30, 5, 43, 9, 69, 38, 27, 79, 47, 9, 36, 6, 1, 92, 44, 51, 50, 16, 81, 21, 9, 50, 84, 14, 45, 59, 124, 215, 36, 6, 1, 20, 31, 35, 33, 46, 18, 3, 23, 114, 19, 41, 84, 14, 8, 35, 114, 19, 73, 14, 39, 68, 42
Offset: 0
Keywords
Links
- Robert G. Wilson v, Table of n, a(n) for n = 0..500
Programs
-
Mathematica
f[n_] := Block[{k = 1, j = 6^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 80, 0]
-
Python
from sympy import nextprime, prevprime def sum2succ(n): return n == prevprime(n//2) + nextprime(n//2) def a(n): if n == 0: return 5 k, pow6 = 1, 6**n while not sum2succ(k*pow6): k += 1 return k print([a(n) for n in range(77)]) # Michael S. Branicky, May 02 2021
Comments