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.

Showing 1-2 of 2 results.

A008610 Molien series of 4-dimensional representation of cyclic group of order 4 over GF(2) (not Cohen-Macaulay).

Original entry on oeis.org

1, 1, 3, 5, 10, 14, 22, 30, 43, 55, 73, 91, 116, 140, 172, 204, 245, 285, 335, 385, 446, 506, 578, 650, 735, 819, 917, 1015, 1128, 1240, 1368, 1496, 1641, 1785, 1947, 2109, 2290, 2470, 2670, 2870, 3091, 3311, 3553, 3795, 4060, 4324, 4612, 4900, 5213, 5525, 5863
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of necklaces with 4 black beads and n white beads.
Also nonnegative integer 2 X 2 matrices with sum of elements equal to n, up to rotational symmetry.
The g.f. is Z(C_4,x), the 4-variate cycle index polynomial for the cyclic group C_4, with substitution x[i]->1/(1-x^i), i=1,...,4. Therefore by Polya enumeration a(n) is the number of cyclically inequivalent 4-necklaces whose 4 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_4,x). - Wolfdieter Lang, Feb 15 2005

Examples

			There are 10 inequivalent nonnegative integer 2 X 2 matrices with sum of elements equal to 4, up to rotational symmetry:
[0 0] [0 0] [0 0] [0 0] [0 1] [0 1] [0 1] [0 2] [0 2] [1 1]
[0 4] [1 3] [2 2] [3 1] [1 2] [2 1] [3 0] [1 1] [2 0] [1 1].
		

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 104.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, April 2004.

Crossrefs

Row n=2 of A343874.
Column k=4 of A037306 and A047996.

Programs

  • GAP
    a:=[1,1,3,5,10,14,22,30];; for n in [9..50] do a[n]:=2*a[n-1]-2*a[n-3] +2*a[n-4]-2*a[n-5]+2*a[n-7]-a[n-1]; od; a; # G. C. Greubel, Jan 31 2020
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) )); // G. C. Greubel, Jan 31 2020
    
  • Maple
    1/(1-x)/(1-x^2)^2/(1-x^4)*(1+2*x^3+x^4);
    seq(coeff(series(%, x, n+1), x, n), n=0..40);
  • Mathematica
    k = 4; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    LinearRecurrence[{2,0,-2,2,-2,0,2,-1}, {1,1,3,5,10,14,22,30}, 50] (* G. C. Greubel, Jan 31 2020 *)
  • PARI
    a(n)=if(n,([0,1,0,0,0,0,0,0; 0,0,1,0,0,0,0,0; 0,0,0,1,0,0,0,0; 0,0,0,0,1,0,0,0; 0,0,0,0,0,1,0,0; 0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,1; -1,2,0,-2,2,-2,0,2]^n*[1;1;3;5;10;14;22;30])[1,1],1) \\ Charles R Greathouse IV, Oct 22 2015
    
  • PARI
    my(x='x+O('x^50)); Vec((1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4))) \\ G. C. Greubel, Jan 31 2020
    
  • Sage
    def A008610_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) ).list()
    A008610_list(50) # G. C. Greubel, Jan 31 2020
    

Formula

G.f.: (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) = (1-x+x^2+x^3)/((1-x)^2*(1-x^2)*(1-x^4)).
a(n) = (1/48)*(2*n^3 + 3*(-1)^n*(n + 4) + 12*n^2 + 25*n + 24 + 12*cos(n*Pi/2)). - Ralf Stephan, Apr 29 2014
G.f.: (1/4)*(1/(1-x)^4 + 1/(1-x^2)^2 + 2/(1-x^4)). - Herbert Kociemba, Oct 22 2016
a(n) = -A032801(-n), per formulae of Colin Barker (A032801) and R. Stephan (above). Also, a(n) - A032801(n+4) = (1+(-1)^signum(n mod 4))/2, i.e., (1,0,0,0,1,0,0,0,...) repeating, (offset 0). - Gregory Gerard Wojnar, Jul 09 2022

Extensions

Comment and example from Vladeta Jovovic, May 18 2000

A267632 Triangle T(n, k) read by rows: the k-th column of the n-th row lists the number of ways to select k distinct numbers (k >= 1) from [1..n] so that their sum is divisible by n.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 4, 3, 1, 0, 1, 3, 5, 5, 3, 1, 1, 1, 3, 7, 9, 7, 3, 1, 0, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 4, 12, 22, 26, 20, 12, 5, 1, 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 5, 19, 42, 66, 76, 66, 43, 19, 5, 1, 0
Offset: 1

Views

Author

Dimitri Papadopoulos, Jan 18 2016

Keywords

Comments

Row less the last element is palindrome for n=odd or n=power of 2 where n is the row number (observation-conjecture).
From Petros Hadjicostas, Jul 13 2019: (Start)
By reading carefully the proof of Lemma 5.1 (pp. 65-66) in Barnes (1959), we see that he actually proved a general result (even though he does not state it in the lemma).
According to the definition of this sequence, for 1 <= k <= n, T(n, k) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = 0 (mod n). The proof of Lemma 5.1 in Barnes (1959) implies that T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
For fixed k >= 1, the g.f. of the column (T(n, k): n >= 1) (with T(n, k) = 0 for 1 <= n < k) is (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s), which generalizes Herbert Kociemba's formula from A032801.
Barnes' (1959) formula is a special case of Theorem 4 (p. 66) in Ramanathan (1944). If R(n, k, v) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = v (mod n), then he proved that R(n, k, v) = (1/n) * Sum_{s | gcd(n,k)} (-1)^(k - (k/s)) * binomial(n/s, k/s) * C_s(v), where C_s(v) = A054535(s, v) = Sum_{d | gcd(s,v)} d * Moebius(s/d) is Ramanujan's sum (even though it was first discovered around 1900 by the Austrian mathematician R. D. von Sterneck).
Because C_s(v = 0) = phi(s), we get Barnes' (implicit) result; i.e., R(n, k, v=0) = T(n, k) for 1 <= k <= n.
For k=2, we have R(n, k=2, v=0) = T(n, k=2) = A004526(n-1) for n >= 1. For k=3, we have R(n, k=3, v=0) = T(n, k=3) = A058212(n) for n >= 1. For k=4, we have R(n, k=4, v=0) = A032801(n) for n >= 1. For k=5, we have R(n, k=5, v=0) = T(n, k=5) = A008646(n-5) for n >= 5.
The reason we have T(2*m+1, k) = A037306(2*m+1, k) = A047996(2*m+1, k) for m >= 0 and k >= 1 is the following. When n = 2*m + 1, all divisors s of gcd(n, k) are odd. In such a case, k - (k/s) is even for all k >= 1, and thus (-1)^(k - (k/s)) = 1, and thus T(n = 2*m+1, k) = (1/n) * Sum_{s | gcd(n, k)} phi(s) * binomial(n/s, k/s) = A037306(2*m+1, k) = A047996(2*m+1, k).
By summing the products of the g.f. of column k times y^k from k = 1 to k = infinity, we get the bivariate g.f. for the array: Sum_{n, k >= 1} T(n, k)*x^n*y^k = Sum_{s >= 1} (phi(s)/s) * log((1 - x^s + (-x*y)^s)/(1 - x^s)) = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
Letting y = 1 in the above bivariate g.f., we get the g.f. of the sequence (Sum_{1 <= k <= n} T(n, k): n >= 1) is -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x)^s) = -x/(1 - x) + Sum_{m >= 0} (phi(2*m + 1)/(2*m + 1)) * log(1 - 2*x^(2*m+1)), which is the g.f. of sequence A082550. Hence, sequence A082550 consists of the row sums.
There is another important interpretation of this array T(n, k) which is related to some of the references for sequence A047996, but because the discussion is too lengthy, we omit the details.
(End)

Examples

			For n = 5, there is one way to pick one number (5), two ways to pick two numbers (1+4, 2+3), two ways to pick 3 numbers (1+4+5, 2+3+5), one way to pick 4 numbers (1+2+3+4), and one way to pick 5 numbers (1+2+3+4+5) so that their sum is divisible by 5. Therefore, T(5,1) = 1, T(5,2) = 2, T(5,3) = 2, T(5,4) = 1, and T(5,5) = 1.
Table for T(n,k) begins as follows:
n\k 1 2   3    4    5    6    7    8    9   10
1   1
2   1 0
3   1 1   1
4   1 1   1    0
5   1 2   2    1    1
6   1 2   4    3    1    0
7   1 3   5    5    3    1    1
8   1 3   7    9    7    3    1    0
9   1 4  10   14   14   10    4    1    1
10  1 4  12   22   26   20   12    5    1    0
...
		

Crossrefs

Programs

  • Maple
    A267632 := proc(n,k)
        local a,msel,p;
        a := 0 ;
        for msel in combinat[choose](n,k) do
            if modp(add(p,p=msel),n) = 0 then
                a := a+1 ;
            end if;
        end do:
        a;
    end proc: # R. J. Mathar, May 15 2016
    # second Maple program:
    b:= proc(n, m, s) option remember; expand(`if`(n=0,
          `if`(s=0, 1, 0), b(n-1, m, s)+x*b(n-1, m, irem(s+n, m))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n$2, 0)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Aug 27 2018
  • Mathematica
    f[k_, n_] :=  Length[Select[Select[Subsets[Range[n]], Length[#] == k &], IntegerQ[Total[#]/n] &]];MatrixForm[Table[{n, Table[f[k, n], {k, n}]}, {n, 10}]] (* Dimitri Papadopoulos, Jan 18 2016 *)

Formula

T(2n+1, k) = A037306(2n+1, k) = A047996(2n+1, k).
From Petros Hadjicostas, Jul 13 2019: (Start)
T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
G.f. for column k >= 1: (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s).
Bivariate g.f.: Sum_{n, k >= 1} T(n, k)*x^n*y^k = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
(End)
Sum_{k=1..n} k * T(n,k) = A309122(n). - Alois P. Heinz, Jul 13 2019
Showing 1-2 of 2 results.