|
|
A180131
|
|
Smallest k such that k*3^n is a sum of two successive primes.
|
|
9
|
|
|
5, 4, 2, 6, 2, 10, 20, 26, 22, 10, 16, 8, 8, 72, 24, 8, 18, 6, 2, 6, 2, 10, 20, 20, 22, 20, 52, 50, 104, 118, 84, 28, 38, 306, 102, 34, 100, 50, 30, 10, 192, 64, 46, 66, 22, 220, 84, 28, 176, 88, 30, 10, 8, 152, 292, 98, 82, 124, 160, 206, 106, 106, 160, 128, 78, 26, 110, 80
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
If a(n) == 0 (mod 3), then a(n+1) = a(n)/3.
Records: 5, 6, 10, 20, 26, 72, 104, 118, 306, 320, 348, 572, 824, 828, 972, 1054, 1110, 1540, ..., .
Corresponding primes are twin primes for n = 0, 1, 10, 13, 14, 15, 22, 102, ..., .
|
|
LINKS
|
|
|
MATHEMATICA
|
f[n_] := Block[{k = 1, j = 3^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, pow3 = 1, 3**n
while not ok(k*pow3): k += 1
return k
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|