cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A318477 Number of n-member subsets of [n^2] whose elements sum to a multiple of n.

This page as a plain text file.
%I A318477 #20 Mar 28 2023 12:32:10
%S A318477 1,1,2,30,460,10630,324516,12271518,553275192,28987537806,
%T A318477 1731030733840,116068178638786,8634941165110140,705873715441872276,
%U A318477 62895036883536770108,6067037854078500844740,629921975126483973659888,70043473196734767582082246
%N A318477 Number of n-member subsets of [n^2] whose elements sum to a multiple of n.
%H A318477 Alois P. Heinz, <a href="/A318477/b318477.txt">Table of n, a(n) for n = 0..338</a>
%F A318477 a(n) = n * A308667(n) for n >= 1.
%F A318477 a(n) ~ exp(n - 1/2) * n^(n - 3/2) / sqrt(2*Pi). - _Vaclav Kotesovec_, Mar 28 2023
%e A318477 a(0) = 1: {}.
%e A318477 a(1) = 1: {1}.
%e A318477 a(2) = 2: {1,3}, {2,4}.
%e A318477 a(3) = 30: {1,2,3}, {1,2,6}, {1,2,9}, {1,3,5}, {1,3,8}, {1,4,7}, {1,5,6}, {1,5,9}, {1,6,8}, {1,8,9}, {2,3,4}, {2,3,7}, {2,4,6}, {2,4,9}, {2,5,8}, {2,6,7}, {2,7,9}, {3,4,5}, {3,4,8}, {3,5,7}, {3,6,9}, {3,7,8}, {4,5,6}, {4,5,9}, {4,6,8}, {4,8,9}, {5,6,7}, {5,7,9}, {6,7,8}, {7,8,9}.
%p A318477 with(numtheory):
%p A318477 a:= proc(n) option remember; `if`(n=0, 1, add(phi(n/d)*
%p A318477       (-1)^(n+d)*binomial(n*d, d), d=divisors(n))/n)
%p A318477     end:
%p A318477 seq(a(n), n=0..20);
%t A318477 a[n_] := (-1)^n Sum[(-1)^d Binomial[d n, d] EulerPhi[n/d], {d, Divisors[n]} ]/n; a[0] = 1;
%t A318477 a /@ Range[0, 20] (* _Jean-François Alcover_, Sep 23 2019 *)
%Y A318477 Main diagonal of A304482 and of A318557.
%Y A318477 Cf. A119358, A169888, A308667.
%K A318477 nonn
%O A318477 0,3
%A A318477 _Alois P. Heinz_, Aug 26 2018