OFFSET
0,1
COMMENTS
If a(n) == 0 (mod 5), then a(n+1) = a(n)/5.
Records: 5, 10, 12, 36, 66, 132, 150, 374, 428, 570, 734, 840, 1938, 2036, 2220, 2968, 3132, 3444, 4014, 6090, ..., .
Corresponding primes are twin primes for n = 0, 1, 51, 102, 103, 202, 275, ..., .
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..500
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]
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov & Robert G. Wilson v, Aug 15 2010
STATUS
approved