OFFSET
0,47
COMMENTS
For n > 0 let b(n) be the inverse Euler transform of a(n). It appears that, if p is the lesser of twin primes, then b(p) = 1 and b(2*p) = -1; otherwise b(n) = 0. - Georg Fischer, Aug 15 2020
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Ilya Gutkovskiy, Scatter plot of a(n) - A299197(n)
Eric Weisstein's World of Mathematics, Twin Primes
FORMULA
G.f.: Product_{k>=1} (1 + x^A001359(k)).
EXAMPLE
a(46) = 2 because we have [41, 5] and [29, 17].
MAPLE
P:= select(isprime, {seq(i, i=3..201, 2)}):
TP:= P intersect map(`-`, P, 2):
G:= mul(1+x^p, p=TP):
seq(coeff(G, x, i), i=0..200); # Robert Israel, Dec 15 2024
MATHEMATICA
nmax = 105; CoefficientList[Series[Product[1 + Boole[PrimeQ[k] && PrimeQ[k + 2]] x^k, {k, 1, nmax}], {x, 0, nmax}], x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 04 2018
STATUS
approved