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.

A331928 Number of compositions (ordered partitions) of n into distinct proper divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 30, 0, 24, 0, 0, 0, 894, 0, 0, 0, 120, 0, 150, 0, 0, 0, 0, 0, 1134, 0, 0, 0, 864, 0, 30, 0, 0, 0, 0, 0, 11934, 0, 0, 0, 0, 0, 150, 0, 840, 0, 0, 0, 129438, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

			a(6) = 6 because we have [3, 2, 1], [3, 1, 2], [2, 3, 1], [2, 1, 3], [1, 3, 2] and [1, 2, 3].
		

Crossrefs

Programs

  • PARI
    a(n)={if(n==0, 1, my(v=divisors(n)); subst(serlaplace((0*y) + polcoef(prod(i=1, #v-1, 1 + y*x^v[i] + O(x*x^n)), n)), y, 1))} \\ Andrew Howroyd, Feb 01 2020

Formula

a(n) = A331927(n) - 1 for n > 0.

A331979 Number of compositions (ordered partitions) of n into distinct nontrivial divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 894, 0, 0, 0, 24, 0, 6, 0, 0, 0, 0, 0, 894, 0, 0, 0, 0, 0, 30, 0, 120, 0, 0, 0, 19518, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 18558, 0, 0, 0, 0, 0, 6, 0, 864
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(12) = 6 because we have [6, 4, 2], [6, 2, 4], [4, 6, 2], [4, 2, 6], [2, 6, 4] and [2, 4, 6].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1, n})[]]):
          b:= proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
                 b(m, i-1, p)+`if`(l[i]>m, 0, b(m-l[i], i-1, p+1))))
              end; forget(b):
          b(n, nops(l), 0)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    a[n_] := If[n == 0, 1, Module[{b, l = Divisors[n] ~Complement~ {1, n}}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i-1, p] + If[l[[i]] > m, 0, b[m - l[[i]], i-1, p+1]]]]; b[n, Length[l], 0]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)

A332001 Number of compositions (ordered partitions) of n into distinct parts that do not divide n.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 4, 2, 4, 4, 20, 2, 34, 14, 20, 14, 146, 8, 244, 22, 140, 202, 956, 16, 782, 596, 752, 216, 5786, 82, 10108, 640, 4016, 5200, 6028, 218, 53674, 14570, 19004, 980, 152810, 1786, 245884, 13588, 16534, 108382, 719156, 1494, 532532, 54316
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2020

Keywords

Examples

			a(9) = 4 because we have [7, 2], [5, 4], [4, 5] and [2, 7].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local b, l; l, b:= numtheory[divisors](n),
          proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<2, 0,
            b(m, i-1, p)+`if`(i>m or i in l, 0, b(m-i, i-1, p+1))))
          end; forget(b): b(n, n-1, 0)
        end:
    seq(a(n), n=0..63);  # Alois P. Heinz, Feb 04 2020
  • Mathematica
    a[n_] := Module[{b, l = Divisors[n]}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 2, 0, b[m, i - 1, p] + If[i > m || MemberQ[l, i], 0, b[m - i, i - 1, p + 1]]]]; b[n, n - 1, 0]];
    a /@ Range[0, 63] (* Jean-François Alcover, Nov 30 2020, after Alois P. Heinz *)

A378843 Number of compositions (ordered partitions) of n into distinct squarefree divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 7, 1, 0, 0, 1, 1, 24, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 151, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 31, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 864, 1, 1, 0, 0, 1, 127, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 7, 1, 0
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 09 2024

Keywords

Comments

From Robert Israel, Dec 15 2024: (Start)
If n is squarefree, a(n) >= 1, as [n] is a composition.
If n = b * c where b and c are coprime and c is squarefree, then a(n) >= a(b), as for any composition C of b into distinct squarefree divisors, multiplying each element of C by c gives a composition of n into distinct squarefree divisors. (End)

Examples

			a(6) = 7 because we have [6], [3, 2, 1], [3, 1, 2], [2, 3, 1], [2, 1, 3], [1, 3, 2] and [1, 2, 3].
a(12) = 24 because we have [6, 3, 2, 1] and 4! = 24 permutations.
		

Crossrefs

Programs

  • Maple
    ptns:= proc(S,n) option remember;
      # subsets of S with sum n
      local m,s;
      if convert(S,`+`) < n then return {} fi;
      if n = 0 then return {{}} fi;
      s:= max(S);
      if s > n then return procname(select(`<=`,S,n),n) fi;
      map(t -> t union {s}, procname(S minus {s},n-s)) union procname(S minus {s}, n)
      end proc:
    sfd:= proc(n) map(convert,combinat:-powerset(numtheory:-factorset(n)),`*`) end proc:
    f:= proc(n) local t;
         add((nops(t))!, t = ptns(sfd(n),n))
    end proc:
    map(f, [$0..100]); # Robert Israel, Dec 15 2024
  • Mathematica
    a[n_] := Module[{d = Select[Divisors[n], SquareFreeQ]}, Total[(Length /@ Select[Subsets[d], Total[#] == n &])!]]; a[0] = 1; Array[a, 100, 0] (* Amiram Eldar, Dec 10 2024 *)
Showing 1-4 of 4 results.