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-4 of 4 results.

A103314 Total number of subsets of the n-th roots of 1 that add to zero.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 10, 2, 16, 8, 34, 2, 100, 2, 130, 38, 256, 2, 1000, 2, 1156, 134, 2050, 2, 10000, 32, 8194, 512, 16900, 2, 146854, 2, 65536, 2054, 131074, 158, 1000000, 2, 524290, 8198, 1336336, 2, 11680390, 2, 4202500, 54872, 8388610, 2, 100000000, 128
Offset: 0

Views

Author

Wouter Meeussen, Mar 11 2005

Keywords

Comments

The term a(0) = 1 counts the single zero-sum subset of the (by convention) empty set of zeroth roots of 1.
I am inclined to believe that if S is a zero-sum subset of the n-th roots of 1, that n can be built up from (zero-sum) cyclically balanced subsets via the following operations: 1. A U B, where A and B are disjoint. 2. A - B, where B is a subset of A. - David W. Wilson, May 19 2005
Lam and Leung's paper, though interesting, does not apply directly to this sequence because it allows repetitions of the roots in the sums.
Observe that 2^n=a(n) (mod n). Sequence A107847 is the quotient (2^n-a(n))/n. - T. D. Noe, May 25 2005
From Max Alekseyev, Jan 31 2008: (Start)
Every subset of the set U(n) = { 1=r^0, r^1, ..., r^(n-1) } of the n-th power roots of 1 (where r is a fixed primitive root) defines a binary word w of the length n where the j-th bit is 1 iff the root r^j is included in the subset.
If d is the period of w with respect to cyclic rotations (thus d|n) then the periodic part of w uniquely defines some binary Lyndon word of the length d (see A001037). In turn, each binary Lyndon word of the length d, where d
The binary Lyndon words of the length n are different in this respect: only some of them correspond to n distinct zero-sum subsets of U(n) while the others do not correspond to such subsets at all. A110981(n) gives the number of binary Lyndon words of the length n that correspond to zero-sum subsets of U(n). (End)

Crossrefs

Equals A070894 + 1. A107847(n) = (2^n - A103314(n))/n, A110981 = A001037 - A107847.
Row sums of A103306. See also A006533, A006561, A006600, A007569, A007678.
Cf. A070925, A107753 (number of primitive subsets of the n-th roots of unity summing to zero), A107754 (number of subsets of the n-th roots of unity summing to one), A107861 (number of distinct values in the sums of all subsets of the n-th roots of unity).
Cf. A322366.

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[Plus@@Table[Count[ (KSubsets[ Range[n], k]), q_List/;Chop[ Abs[Plus@@(E^(2.*Pi*I*q/n))]]==0], {k, 0, n}], {n, 15}] (* T. D. Noe *)
  • PARI
    /* This program implements all known results; it works for all n except for 165, 195, 210, 231, 255, 273, 285, 330, 345, ... */
    A103314(n) = { local(f=factor(n)); n<2 & return(1); n==f[1,1] & return(2);
    vecmax(f[,2])>1 & return(A103314(f=prod(i=1,#f~,f[i,1]))^(n/f));
    if( 2==#f=f[,1], return(2^f[1]+2^f[2]-2));
    #f==3 & f[1]==2 & return(sum(j=0,f[2],binomial(f[2],j)*(2^j+2^(f[2]-j))^f[3])
    +(2^f[2]+2)^f[3]+(2^f[3]+2)^f[2]-2*((2^f[2]+1)^f[3]+(2^f[3]+1)^f[2])+2^(f[2]*f[3]));
    n==105 & return(166093023482); error("A103314(n) is unknown for n=",n) }
    /* Max Alekseyev and M. F. Hasler, Jan 31 2008 */

Formula

a(n) = A070894(n)+1.
a(2^n) = 2^(2^(n-1)). - Dan Asimov and Gareth McCaughan, Mar 11 2005
a(2n) = a(n)^2 if n is even. If p, q are primes, a(pq) = 2^p+2^q-2. In particular, if p is prime, a(2p) = 2^p + 2. - Gareth McCaughan, Mar 12 2005
a(n) == 2^n (mod n), a(p) = 2 (p prime). - David W. Wilson, May 08 2005
It appears that a(n) = a(s(n))^(n/s(n)) where s(n) = A007947(n) is the squarefree kernel of n. This is true if all zero-sum subsets of the n-th roots of 1 are formed by set operations on cyclic subsets. If true, A103314 is determined by its values on squarefree numbers (A005117). Some consequences would be a(p^n) = 2^p^(n-1), a(p^m q^n) = (2^p+2^q+2)^(p^(m-1) q^(n-1)) and a(p^2 n) = a(pn)^p for primes p and q. - David W. Wilson, May 08 2005
a(pn) = a(n)^p when p is prime and p|n; a(2p) = 2^p+2 when p is an odd prime. More generally a(pq) = 2^p+2^q-2 when p, q are distinct primes. - Gareth McCaughan, Mar 12 2005
For distinct odd primes p and q, a(2pq) = (2^p+2)^q + (2^q+2)^p - 2(2^p+1)^q - 2(2^q+1)^p + 2^(pq) + SUM[j=0..p] binomial(p,j)(2^j+2^(p-j))^q. - Sasha Rybak, Sep 21 2007.
a(n) = n*A110981(n) + 2^n - n*A001037(n). - Max Alekseyev, Jan 14 2008

Extensions

More terms from David W. Wilson, Mar 12 2005
Scott Huddleston (scotth(AT)ichips.intel.com) finds that a(30) >= 146854 and conjectures that is the true value of a(30). - Mar 24 2005. Confirmed by Meeussen and Wilson.
More terms from T. D. Noe, May 25 2005
Further terms from Max Alekseyev and M. F. Hasler, Jan 07 2008
Edited by M. F. Hasler, Feb 06 2008
Duplicate Mathematica program deleted by Harvey P. Dale, Jun 28 2021

A299807 Rectangular array read by antidiagonals: T(n,k) is the number of distinct sums of k complex n-th roots of 1, n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 9, 10, 5, 1, 1, 6, 15, 16, 15, 6, 1, 1, 7, 19, 35, 25, 21, 7, 1, 1, 8, 28, 37, 70, 36, 28, 8, 1, 1, 9, 33, 84, 61, 126, 49, 36, 9, 1, 1, 10, 45, 96, 210, 91, 210, 64, 45, 10, 1, 1, 11, 51, 163, 225, 462, 127, 330, 81, 55, 11, 1, 1, 12, 66, 180, 477, 456, 924, 169, 495, 100, 66
Offset: 1

Author

Max Alekseyev, Feb 24 2018

Keywords

Examples

			Array starts:
  n=1:  1,  1,  1,   1,   1,    1,    1,    1,     1,     1,     1, ...
  n=2:  1,  2,  3,   4,   5,    6,    7,    8,     9,    10,    11, ...
  n=3:  1,  3,  6,  10,  15,   21,   28,   36,    45,    55,    66, ...
  n=4:  1,  4,  9,  16,  25,   36,   49,   64,    81,   100,   121, ...
  n=5:  1,  5, 15,  35,  70,  126,  210,  330,   495,   715,  1001, ...
  n=6:  1,  6, 19,  37,  61,   91,  127,  169,   217,   271,   331, ...
  n=7:  1,  7, 28,  84, 210,  462,  924, 1716,  3003,  5005,  8008, ...
  n=8:  1,  8, 33,  96, 225,  456,  833, 1408,  2241,  3400,  4961, ...
  n=9:  1,  9, 45, 163, 477, 1197, 2674, 5454, 10341, 18469, 31383, ...
  n=10: 1, 10, 51, 180, 501, 1131, 2221, 3951,  6531, 10201, 15231, ...
  ...
		

Crossrefs

Rows: A000012 (n=1), A000027 (n=2), A000217 (n=3), A000290 (n=4), A000332 (n=5), A354343 (n=6), A000579 (n=7), A014820 (n=8).
Columns: A000012 (k=0), A000027 (k=1), A031940 (k=2).
Diagonal: A299754 (n=k).

Formula

From Chai Wah Wu, May 28 2018: (Start)
The following are all conjectures.
For m >= 0, the 2^(m+1)-th row are the figurate numbers based on the 2^m-dimensional regular convex polytope with g.f.: (1+x)^(2^m-1)/(1-x)^(2^m+1).
For p prime, the n=p row corresponds to binomial(k+p-1,p-1) for k = 0,1,2,3,..., which is the maximum possible (i.e., the number of combinations with repetitions of k choices from p categories) with g.f.: 1/(1-x)^p.
(End)

Extensions

Row 6 corrected by Max Alekseyev, Aug 14 2022

A299754 Number of distinct sums of n complex n-th roots of 1.

Original entry on oeis.org

1, 3, 10, 25, 126, 127, 1716, 2241, 18469, 15231, 352716, 36973, 5200300, 1799995, 30333601, 24331777, 1166803110, 12247363, 17672631900, 723276561
Offset: 1

Author

David W. Wilson, Feb 18 2018

Keywords

Comments

a(n) == 1 (mod n).
Also, a(n) equals the size of the set { f(x) mod Phi_n(x) }, where f(x) runs over the polynomials of degree at most n-1 with nonnegative integer coefficients such that f(1)=n (i.e. the coefficients sum to n), Phi_n(x) is the n-th cyclotomic polynomial. In particular, for prime n, Phi_n(x)=1+x+...+x^(n-1) and thus all f(x) mod Phi_n(x) are distinct, implying that a(n)=binomial(2*n-1,n). - Max Alekseyev, Feb 20 2018

Examples

			From _M. F. Hasler_, Feb 18 2018: (Start)
For n=2, the n-th roots of unity are U[2] = {-1, 1}, and taking x, y in this set, we can get x + y = -2, 0 or 2.
For n=3, the n-th roots of unity are U[3] = {1, w, w^2} where w = exp(2i*Pi/3) = -1/2 + i sqrt(3)/2, and taking x, y, z in this set, we can get x + y + z to be any of the 10 distinct values { 3, 2 + w, 2 + w^2, 1 + 2w, 1 + 2w^2, 0, w - 1, w^2 - 1, 3w, 3w^2 }. (End)
		

Programs

  • Maple
    nexti:= proc(i,N) local ip,j,k;
      ip:= i;
      for k from N to 1 by -1 while i[k]=N-1 do od;
      if k=0 then return NULL fi;
      ip[k]:= ip[k]+1;
      for j from k+1 to N do ip[j]:= ip[k] od;
      ip
    end proc:
    f:= proc(N) local S, i,P,z;
      S:= {}:
      i:= <(0$N)>:
      P:= numtheory:-cyclotomic(N,z);
      while i <> NULL do
        S:= S union {rem(add(z^i[k],k=1..N),P,z)};
        i:= nexti(i,N);
      od;
      nops(S);
    end proc:
    seq(f(N),N=1..10); # Robert Israel, Feb 18 2018
  • Mathematica
    a[n_] := (t = Table[Exp[2 k Pi I/n], {k, 0, n - 1}]; b[0] = 1; iter = Table[{b[j], b[j - 1], n}, {j, 1, n}]; msets = Table[Array[b, n], Evaluate[Sequence @@ iter]]; tot = Total /@ (t[[#]] & /@ Flatten[msets, n - 1]) // N; u = Union[tot, SameTest -> (Chop[Abs[#1 - #2]] == 0 &)]; u // Length); Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 10}] (* Jean-François Alcover, Feb 19 2018 *)
  • PARI
    a(n,U=vector(n,k,bestappr(exp(2*Pi/n*k*I),5*2^n)),S=[])={forvec(i=vector(n,k,[1,n]),S=setunion(S,[vecsum(vecextract(U,i))]));#S} \\ Not very efficient for n > 8. - M. F. Hasler, Feb 18 2018

Formula

For prime p, a(p) = binomial(2*p-1,p). - Conjectured by Robert Israel, Feb 18 2018; proved by Max Alekseyev, Feb 20 2018
a(n) = A299807(n,n). - Max Alekseyev, Feb 25 2018

Extensions

a(1) through a(11) from Robert Israel, Feb 18 2018
a(12)-a(13) from Chai Wah Wu, Feb 20 2018
a(14)-a(20) from Max Alekseyev, Feb 22 2018

A354343 Number of distinct sums of n complex 6th power roots of unity.

Original entry on oeis.org

1, 6, 19, 37, 61, 91, 127, 169, 217, 271, 331, 397, 469, 547, 631, 721, 817, 919, 1027, 1141, 1261, 1387, 1519, 1657, 1801, 1951, 2107, 2269, 2437, 2611, 2791, 2977, 3169, 3367, 3571, 3781, 3997, 4219, 4447, 4681, 4921, 5167, 5419, 5677, 5941, 6211, 6487, 6769, 7057, 7351, 7651, 7957
Offset: 0

Author

Max Alekseyev, Aug 15 2022

Keywords

Crossrefs

Programs

Formula

For n >= 2, a(n) = 3*n^2 + 3*n + 1 = A003215(n).
For n >= 5, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f. (1 + 3*x + 4*x^2 - 3*x^3 + x^4) / (1 - x)^3.
Showing 1-4 of 4 results.