A180132 Smallest k such that k*5^n is a sum of two successive primes.
5, 1, 4, 10, 2, 8, 12, 12, 36, 12, 28, 66, 30, 6, 18, 132, 36, 108, 34, 14, 48, 60, 12, 22, 150, 30, 6, 74, 54, 16, 8, 66, 150, 30, 6, 14, 374, 110, 22, 82, 62, 66, 108, 348, 114, 428, 190, 38, 570, 114, 102, 24, 82, 86, 178, 420, 84, 108, 328, 186, 126, 192, 76, 82, 24
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 = 5^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 < 2: return [5, 1][n] k, pow5 = 1, 5**n while not sum2succ(k*pow5): k += 1 return k print([a(n) for n in range(65)]) # Michael S. Branicky, May 01 2021
Comments