A103314 Total number of subsets of the n-th roots of 1 that add to zero.
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
A321414 Array read by antidiagonals: T(n,k) is the number of n element multisets of the 2k-th roots of unity with zero sum.
0, 0, 1, 0, 2, 0, 0, 3, 0, 1, 0, 4, 2, 3, 0, 0, 5, 0, 6, 0, 1, 0, 6, 0, 10, 6, 4, 0, 0, 7, 4, 15, 0, 12, 0, 1, 0, 8, 0, 21, 2, 20, 12, 5, 0, 0, 9, 0, 28, 24, 35, 0, 21, 0, 1, 0, 10, 6, 36, 0, 64, 10, 35, 22, 6, 0, 0, 11, 0, 45, 0, 84, 84, 70, 0, 33, 0, 1
Offset: 1
Comments
Equivalently, the number of closed convex paths of length n whose steps are the 2k-th roots of unity up to translation. For even n, there will be k paths of zero area consisting of n/2 steps in one direction followed by n/2 steps in the opposite direction.
Examples
Array begins: ========================================================= n\k| 1 2 3 4 5 6 7 8 9 10 11 12 ---|----------------------------------------------------- 1 | 0 0 0 0 0 0 0 0 0 0 0 0 ... 2 | 1 2 3 4 5 6 7 8 9 10 11 12 ... 3 | 0 0 2 0 0 4 0 0 6 0 0 8 ... 4 | 1 3 6 10 15 21 28 36 45 55 66 78 ... 5 | 0 0 6 0 2 24 0 0 54 4 0 96 ... 6 | 1 4 12 20 35 64 84 120 183 220 286 396 ... 7 | 0 0 12 0 10 84 2 0 270 40 0 624 ... 8 | 1 5 21 35 70 174 210 330 657 715 1001 1749 ... 9 | 0 0 22 0 30 236 14 0 1028 220 0 3000 ... 10 | 1 6 33 56 128 420 462 792 2097 2010 3003 6864 ... 11 | 0 0 36 0 70 576 56 0 3312 880 2 11976 ... 12 | 1 7 50 84 220 926 924 1716 6039 5085 8008 24216 ... ... T(5, 3) = 6 because there are 6 rotations of the following figure: o---o / \ o---o---o . T(6, 3) = 12 because there are 4 basic shapes illustrated below which with rotations and reflections give 3 + 2 + 1 + 6 = 12 convex paths. o o---o o---o / \ / \ \ \ o===o===o===o o o o o o o / \ \ / \ \ o---o---o o---o o---o
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..465
Crossrefs
Programs
-
PARI
\\ only supports k with at most one odd prime factor. T(n, k)={my(r=valuation(k, 2), p); polcoef(if(k>>r == 1, 1/(1-x^2)^k + O(x*x^n), if(isprimepower(k>>r, &p), ((2/(1 - x^p) - 1)/(1 - x^2 + O(x*x^n))^p)^(k/p), error("Cannot handle k=", k) )), n)}
Formula
G.f. of column k = 2^r: 1/(1 - x^2)^k - 1.
G.f. of column k = 2^r*p^e: ((2/(1 - x^p) - 1)/(1 - x^2)^p)^(k/p) - 1 for odd prime p.
A322366 Number of integers k in {0,1,...,n} such that k identical test tubes can be balanced in a centrifuge with n equally spaced holes.
1, 0, 2, 2, 3, 2, 5, 2, 5, 4, 7, 2, 11, 2, 9, 8, 9, 2, 17, 2, 17, 10, 13, 2, 23, 6, 15, 10, 23, 2, 29, 2, 17, 14, 19, 12, 35, 2, 21, 16, 37, 2, 41, 2, 35, 38, 25, 2, 47, 8, 47, 20, 41, 2, 53, 16, 51, 22, 31, 2, 59, 2, 33, 52, 33, 18, 65, 2, 53, 26, 67, 2, 71, 2, 39, 68, 59, 18, 77, 2, 77, 28, 43, 2, 83, 22, 45, 32, 79
Offset: 0
Comments
Examples
a(6) = |{0,2,3,4,6}| = 5. a(9) = |{0,3,6,9}| = 4. a(10) = |{0,2,4,5,6,8,10}| = 7.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
- Matt Baker, The Balanced Centrifuge Problem, Math Blog, 2018.
- Holly Krieger and Brady Haran, The Centrifuge Problem, Numberphile video (2018)
- T. Y. Lam and K. H. Leung, On vanishing sums for roots of unity, arXiv:math/9511209 [math.NT], 1995.
- Gary Sivek, On vanishing sums of distinct roots of unity, #A31, Integers 10 (2010), 365-368.
- Robert G. Wilson v, Graph of the first 100001 terms.
Crossrefs
Programs
-
Maple
a:= proc(n) option remember; local f, b; f, b:= map(i-> i[1], ifactors(n)[2]), proc(m, i) option remember; m=0 or i>0 and (b(m, i-1) or f[i]<=m and b(m-f[i], i)) end; forget(b); (t-> add( `if`(b(j, t) and b(n-j, t), 1, 0), j=0..n))(nops(f)) end: seq(a(n), n=0..100);
-
Mathematica
$RecursionLimit = 4096; a[1] = 0; a[n_] := a[n] = Module[{f, b}, f = FactorInteger[n][[All, 1]]; b[m_, i_] := b[m, i] = m == 0 || i > 0 && (b[m, i - 1] || f[[i]] <= m && b[m - f[[i]], i]); With[{t = Length[f]}, Sum[ If[b[j, t] && b[n - j, t], 1, 0], {j, 0, n}]]]; Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Dec 13 2018, after Alois P. Heinz, corrected and updated Aug 07 2021 *) f[n_] := Block[{c = 2, k = 2, p = First@# & /@ FactorInteger@ n}, While[k < n, If[ IntegerPartitions[k, All, p, 1] != {} && IntegerPartitions[n - k, All, p, 1] != {}, c++]; k++]; c]; f[0] = 1; f[1] = 0; Array[f, 75] (* Robert G. Wilson v, Aug 22 2021 *)
Formula
a(n) = |{ k : k and n-k can be written as a sum of prime factors of n }|.
a(n) = 2 <=> n is prime (A000040).
a(n) >= n-1 <=> n in {1,2,3,4} union { A008588 }.
a(n) = (n+4)/2 <=> n in { A100484 } minus { 4 }.
a(n) = (n+9)/3 <=> n in { A001748 } minus { 9 }.
a(n) = (n+25)/5 <=> n in { A001750 } minus { 25 }.
a(n) = (n+49)/7 <=> n in { A272470 } minus { 49 }.
a(n^2) = n+1 <=> n = 0 or n is prime <=> n in { A182986 }.
a(n) is odd <=> n in { A163300 }.
a(n) is even <=> n in { A004280 }.
A306275 Number of values 0 < k <= n for which there are no k distinct n-th roots of unity that sum to zero.
1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 2, 12, 6, 8, 8, 16, 2, 18, 4, 12, 10, 22, 2, 20, 12, 18, 6, 28, 2, 30, 16, 20, 16, 24, 2, 36, 18, 24, 4, 40, 2, 42, 10, 8, 22, 46, 2, 42, 4, 32, 12, 52, 2, 40, 6, 36, 28, 58, 2, 60, 30, 12, 32, 48, 2, 66, 16, 44, 4, 70, 2, 72
Offset: 1
Keywords
Comments
In the first 17 terms a(n) = phi(n) except for n=12. For primes a(p) = p - 1.
Also the number of 0's in the n-th row of A103306. - Alois P. Heinz, Feb 03 2019
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- Matt Baker, The Balanced Centrifuge Problem, Math Blog, 2018.
- Holly Krieger and Brady Haran, The Centrifuge Problem, Numberphile video (2018)
- T. Y. Lam and K. H. Leung, On vanishing sums for roots of unity, arXiv:math/9511209 [math.NT], 1995.
- Gary Sivek, On vanishing sums of distinct roots of unity, #A31, Integers 10 (2010), 365-368.
Programs
-
Maple
a:= proc(n) option remember; local f, b; f, b:= map(i-> i[1], ifactors(n)[2]), proc(m, i) option remember; m=0 or i>0 and (b(m, i-1) or f[i]<=m and b(m-f[i], i)) end; forget(b); (t-> add( `if`(b(j, t) and b(n-j, t), 0, 1), j=1..n))(nops(f)) end: seq(a(n), n=1..100); # Alois P. Heinz, Feb 03 2019
-
Mathematica
a := Function[{n}, Count[Function[{k}, Fold[And, (#!=0)& /@ RootReduce @* Total /@ Subsets[Exp[2*Pi*I*#/n]& /@ Range[0,n-1], {k}]]] /@ Range[1,n],True] ] (* Second program: *) A322366[n_] := A322366[n] = Module[{f, b}, f = FactorInteger[n][[All, 1]]; b[m_, i_] := b[m, i] = m == 0 || i > 0 && (b[m, i - 1] || f[[i]] <= m && b[m - f[[i]], i]); Function[t, Sum[If[b[j, t] && b[n - j, t], 1, 0], {j, 0, n}]][Length[f]]]; a[n_] := If[n == 1, 1, 1 + n - A322366[n]]; Array[a, 100] (* Jean-François Alcover, May 23 2020, after Alois P. Heinz *)
Formula
a(n) = #{k in {1,2,...,n} | for all subsets U of {exp(2*Pi*i*m/n)|m=0,1,...,n-1} of size #U=k we have sum(U) != 0 }.
a(n) = 1 + n - A322366(n) for n > 1, a(1) = 1. - Alois P. Heinz, Feb 03 2019
a(n) is even for n >= 3. - Alois P. Heinz, Feb 05 2019
Extensions
More terms from Alois P. Heinz, Feb 03 2019
Comments
Links
Crossrefs
Programs
Mathematica
PARI
Formula
Extensions