A180136 Smallest k such that k*12^n is a sum of two successive primes.
5, 1, 1, 2, 18, 8, 13, 6, 2, 11, 11, 39, 20, 12, 1, 8, 9, 31, 182, 24, 2, 126, 128, 66, 9, 86, 146, 43, 170, 49, 155, 119, 115, 21, 77, 18, 60, 5, 119, 81, 27, 45, 81, 23, 28, 134, 14, 262, 131, 86, 55, 7, 549, 81, 199, 107, 100, 184, 85, 80, 32, 43, 118, 299, 43, 224, 187
Offset: 0
Keywords
Links
- Robert G. Wilson v, Table of n, a(n) for n = 0..200
Programs
-
Mathematica
f[n_] := Block[{k = 1, j = 12^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, pow12 = 1, 12**n while not sum2succ(k*pow12): k += 1 return k print([a(n) for n in range(67)]) # Michael S. Branicky, May 01 2021
Comments