OFFSET
1,5
COMMENTS
Conjecture: a(n) > 0 for all n > 3, and a(n) = 1 only for n = 4, 30, 83.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 1 since 4 = 2 + 2 with 2, prime(2) - 2 + 1 = 2 and 2*3 - prime(2) = 3 all prime.
a(30) = 1 since 30 = 3 + 27 with 3, prime(3) - 3 + 1 = 3 and 27*28 - prime(27) = 756 - 103 = 653 all prime.
a(83) = 1 since 83 = 13 + 70 with 13, prime(13) - 13 + 1 = 29 and 70*71 - prime(70) = 4970 - 349 = 4621 all prime.
MATHEMATICA
p[n_]:=PrimeQ[Prime[n]-n+1]
q[n_]:=PrimeQ[n(n+1)-Prime[n]]
a[n_]:=Sum[If[p[Prime[k]]&&q[n-Prime[k]], 1, 0], {k, 1, PrimePi[n-1]}]
Table[a[n], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 14 2014
STATUS
approved