OFFSET
0,1
COMMENTS
If a(n) == 0 (mod 11), then a(n+1) = a(n)/11.
Records: 5, 18, 24, 32, 40, 94, 168, 196, 228, 336, 512, 770, 996, 1446, 1644, 1812, 1900, 3840, ..., .
Corresponding primes are twin primes for n = 0, 3, ..., .
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..200
MATHEMATICA
f[n_] := Block[{k = 1, j = 11^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 isprime, nextprime, prevprime
def ok(n):
if n <= 5: return n == 5
return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
def a(n):
k, pow11 = 1, 11**n
while not ok(k*pow11): k += 1
return k
print([a(n) for n in range(62)]) # Michael S. Branicky, May 18 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov & Robert G. Wilson v, Aug 15 2010
STATUS
approved