login
a(n) = Sum_{k=1..n, gcd(n,k) = 1} binomial(n,k)^2.
0

%I #7 Aug 12 2020 11:10:38

%S 1,4,18,32,250,72,3430,6400,34506,29000,705430,1254816,10400598,

%T 8281392,86567400,300533760,2333606218,2172355848,35345263798,

%U 68442424000,332533406646,554415527952,8233430727598,12704658876288,105035376968750

%N a(n) = Sum_{k=1..n, gcd(n,k) = 1} binomial(n,k)^2.

%C a(n) is a multiple of n^2 for all n.

%F a(p) = binomial(2*p,p) - 2, where p is prime.

%t a[n_] := Sum[If[GCD[n, k] == 1, Binomial[n, k]^2, 0], {k, 1, n}]; Table[a[n], {n, 1, 25}]

%o (PARI) a(n) = sum(k=1, n, if (gcd(n,k) == 1, binomial(n,k)^2)); \\ _Michel Marcus_, Aug 12 2020

%Y Cf. A000984, A056188.

%K nonn

%O 1,2

%A _Ilya Gutkovskiy_, Aug 10 2020