A334768 Self-convolution of A061397.
0, 0, 0, 0, 4, 12, 9, 20, 30, 28, 67, 0, 70, 44, 115, 52, 188, 0, 284, 68, 284, 76, 405, 0, 714, 92, 573, 0, 604, 0, 1182, 116, 668, 124, 1271, 0, 1960, 0, 795, 148, 1642, 0, 2680, 164, 1570, 172, 2183, 0, 3974, 188, 3024, 0, 2706, 0, 5354, 212, 2842, 0, 3799
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
Programs
-
Maple
a:= n-> (f-> add(f(j)*f(n-j), j=0..n))(k-> `if`(isprime(k), k, 0)): seq(a(n), n=0..60); # Alois P. Heinz, May 11 2020
-
Mathematica
Table[Sum[If[PrimeQ[k], k, 0]*If[PrimeQ[n-k], n-k, 0], {k, 0, n}], {n, 0, 100}] (* Vaclav Kotesovec, May 10 2020 *)
-
PARI
P(n) = if (isprime(n), n); a(n) = sum(k=1, n-1, P(k)*P(n-k)); \\ Michel Marcus, May 10 2020
-
Python
def a(n): A061397 = [0]+[factorial(2*i-1)%(i**2) for i in range(1,n+1)] sum = 0 for i in range(1,n): sum += A061397[i] * A061397[n-i] return sum
Formula
a(n) = Sum_{k=1..n-1} P(k)*P(n-k) where P(k) = A061397(k).
Comments