OFFSET
0,2
COMMENTS
The first odd prime is here considered to be p_0 = 1.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
EXAMPLE
a(9) = 2*p_4 = 22; a(8) = 1*0+1*4+1*0+2*3+0*0+3*2+0*1+4*1+0*1 = 20.
MATHEMATICA
(* b = A073739 *) b[n_ /; n <= 2] = 1; b[_?EvenQ] = 0; b[n_] := b[n] = Prime[(n+1)/2] - b[n-2]; a[0] = 1; a[1] = 2; a[n_?OddQ] := 2*Prime[(n-1)/2+1]; a[n_?EvenQ] := Sum[b[k]*b[n-k], {k, 0, n}]; Table[a[n], {n, 0, 54}] (* Jean-François Alcover, Aug 01 2013 *)
PROG
(Haskell)
a073740 n = a073740_list !! n
a073740_list = tail $ f a073739_list [] where
f (x:xs) ys = (sum $ zipWith (*) ys a073739_list) : f xs (x : ys)
-- Reinhard Zumkeller, Aug 09 2015
CROSSREFS
KEYWORD
AUTHOR
Paul D. Hanna, Aug 07 2002
STATUS
approved