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.

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.

This page as a plain text file.
%I A322366 #75 May 27 2022 02:07:07
%S A322366 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,
%T A322366 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,
%U A322366 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
%N 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.
%C A322366 Numbers where a(n) + A000010(n) != n + 1: A102467. - _Robert G. Wilson v_, Aug 23 2021
%H A322366 Alois P. Heinz, <a href="/A322366/b322366.txt">Table of n, a(n) for n = 0..10000</a>
%H A322366 Matt Baker, <a href="https://mattbaker.blog/2018/06/25/the-balanced-centrifuge-problem/">The Balanced Centrifuge Problem</a>, Math Blog, 2018.
%H A322366 Holly Krieger and Brady Haran, <a href="https://www.youtube.com/watch?v=7DHE8RnsCQ8">The Centrifuge Problem</a>, Numberphile video (2018)
%H A322366 T. Y. Lam and K. H. Leung, <a href="https://arxiv.org/abs/math/9511209">On vanishing sums for roots of unity</a>, arXiv:math/9511209 [math.NT], 1995.
%H A322366 Gary Sivek, <a href="http://www.emis.de/journals/INTEGERS/papers/k31/k31.Abstract.html">On vanishing sums of distinct roots of unity</a>, #A31, Integers 10 (2010), 365-368.
%H A322366 Robert G. Wilson v, <a href="/A322366/a322366_3.pdf">Graph of the first 100001 terms.</a>
%F A322366 a(n) = |{ k : k and n-k can be written as a sum of prime factors of n }|.
%F A322366 a(n) = 2 <=> n is prime (A000040).
%F A322366 a(n) >= n-1 <=> n in {1,2,3,4} union { A008588 }.
%F A322366 a(n) = (n+4)/2 <=> n in { A100484 } minus { 4 }.
%F A322366 a(n) = (n+9)/3 <=> n in { A001748 } minus { 9 }.
%F A322366 a(n) = (n+25)/5 <=> n in { A001750 } minus { 25 }.
%F A322366 a(n) = (n+49)/7 <=> n in { A272470 } minus { 49 }.
%F A322366 a(n^2) = n+1 <=> n = 0 or n is prime <=> n in { A182986 }.
%F A322366 a(A001248(n)) = A008864(n).
%F A322366 a(n) is odd <=> n in { A163300 }.
%F A322366 a(n) is even <=> n in { A004280 }.
%e A322366 a(6) = |{0,2,3,4,6}| = 5.
%e A322366 a(9) = |{0,3,6,9}| = 4.
%e A322366 a(10) = |{0,2,4,5,6,8,10}| = 7.
%p A322366 a:= proc(n) option remember; local f, b; f, b:=
%p A322366        map(i-> i[1], ifactors(n)[2]),
%p A322366        proc(m, i) option remember; m=0 or i>0 and
%p A322366         (b(m, i-1) or f[i]<=m and b(m-f[i], i))
%p A322366        end; forget(b); (t-> add(
%p A322366       `if`(b(j, t) and b(n-j, t), 1, 0), j=0..n))(nops(f))
%p A322366     end:
%p A322366 seq(a(n), n=0..100);
%t A322366 $RecursionLimit = 4096;
%t A322366 a[1] = 0;
%t A322366 a[n_] := a[n] = Module[{f, b}, f = FactorInteger[n][[All, 1]];
%t A322366      b[m_, i_] := b[m, i] = m == 0 || i > 0 &&
%t A322366      (b[m, i - 1] || f[[i]] <= m && b[m - f[[i]], i]);
%t A322366      With[{t = Length[f]}, Sum[
%t A322366      If[b[j, t] && b[n - j, t], 1, 0], {j, 0, n}]]];
%t A322366 Table[a[n], {n, 0, 1000}] (* _Jean-François Alcover_, Dec 13 2018, after _Alois P. Heinz_, corrected and updated Aug 07 2021 *)
%t A322366 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 *)
%Y A322366 Cf. A000040, A001248, A001748, A001750, A004280, A008588, A008864, A100484, A103306, A103314, A163300, A182986, A272470, A306275.
%K A322366 nonn,look
%O A322366 0,3
%A A322366 _Alois P. Heinz_, Dec 04 2018