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.

Previous Showing 21-26 of 26 results.

A284466 Number of compositions (ordered partitions) of n into odd divisors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 6, 2, 1, 20, 8, 2, 60, 2, 10, 450, 1, 2, 726, 2, 140, 3321, 14, 2, 5896, 572, 16, 26426, 264, 2, 394406, 2, 1, 226020, 20, 51886, 961584, 2, 22, 2044895, 38740, 2, 20959503, 2, 676, 478164163, 26, 2, 56849086, 31201, 652968, 184947044, 980, 2, 1273706934, 6620376, 153366, 1803937344
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 27 2017

Keywords

Examples

			a(10) = 8 because 10 has 4 divisors {1, 2, 5, 10} among which 2 are odd {1, 5} therefore we have [5, 5], [5, 1, 1, 1, 1, 1], [1, 5, 1, 1, 1, 1], [1, 1, 5, 1, 1, 1], [1, 1, 1, 5, 1, 1], [1, 1, 1, 1, 5, 1], [1, 1, 1, 1, 1, 5] and [1, 1, 1, 1, 1, 1, 1, 1, 1, 1].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local b, l;
          l, b:= select(x-> is(x:: odd), divisors(n)),
          proc(m) option remember; `if`(m=0, 1,
             add(`if`(j>m, 0, b(m-j)), j=l))
          end; b(n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[Mod[d[[k]], 2] == 1] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 57}]
  • Python
    from sympy import divisors
    from sympy.core.cache import cacheit
    @cacheit
    def a(n):
        l=[x for x in divisors(n) if x%2]
        @cacheit
        def b(m): return 1 if m==0 else sum(b(m - j) for j in l if j <= m)
        return b(n)
    print([a(n) for n in range(61)]) # Indranil Ghosh, Aug 01 2017, after Maple code

Formula

a(n) = [x^n] 1/(1 - Sum_{d|n, d positive odd} x^d).
a(n) = 1 if n is a power of 2.
a(n) = 2 if n is an odd prime.

A332310 Number of compositions (ordered partitions) of n into distinct parts where no part is a multiple of 4.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 9, 5, 12, 17, 23, 43, 50, 55, 67, 111, 144, 273, 291, 377, 410, 689, 827, 961, 1860, 1663, 2647, 3573, 4610, 4683, 6753, 8465, 11232, 16835, 19985, 24073, 29258, 40411, 51367, 58431, 72084, 99807, 119409, 176387, 199922, 250841, 290123
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 09 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n$2, 0):
    seq(a(n), n=0..55);  # Alois P. Heinz, Feb 09 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n, 0, If[n == 0, p!, Sum[b[n - i j, i - 1, p + j], {j, 0, Min[Mod[i, 4], 1, n/i]}]]];
    a[n_] := b[n, n, 0];
    a /@ Range[0, 55] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)

A097936 Total number of parts in all compositions of n into distinct odd parts.

Original entry on oeis.org

1, 0, 1, 4, 1, 4, 1, 8, 19, 8, 19, 12, 37, 12, 55, 112, 73, 112, 91, 212, 127, 308, 145, 504, 781, 600, 817, 892, 1453, 1084, 2089, 1472, 3343, 1760, 4579, 6564, 6433, 6948, 8287, 11944, 11341, 16744, 14395, 26156, 18667, 35468, 22921, 53712, 64273, 67440
Offset: 1

Views

Author

Vladeta Jovovic, Sep 05 2004

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(n>(i+1)^2/4, [][], zip((x, y)->x+y, [b(n, i-2)],
          `if`(i>n, [], [0, b(n-i, i-2)]), 0)[]))
        end:
    a:= proc(n) option remember; local l; l:=[b(n, n-1+irem(n,2))];
          add(i*l[i+1]*i!, i=1..nops(l)-1)
        end:
    seq (a(n), n=1..60);  # Alois P. Heinz, Nov 20 2012
  • Mathematica
    Drop[ CoefficientList[ Series[Sum[k*k!*x^k^2/Product[1 - x^(2j), {j, 1, k}], {k, 1, 55}], {x, 0, 50}], x], 1] (* Robert G. Wilson v, Sep 08 2004 *)

Formula

Sum_{k>0} (k*k!*x^(k^2)/Product_{j=1..k} (1-x^(2*j))).

Extensions

More terms from Robert G. Wilson v, Sep 08 2004

A331983 Number of compositions (ordered partitions) of n into distinct squares > 1.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 0, 2, 0, 1, 0, 6, 0, 2, 2, 0, 0, 0, 8, 0, 0, 0, 7, 6, 0, 2, 2, 24, 0, 6, 0, 2, 0, 0, 8, 6, 0, 1, 32, 0, 0, 2, 6, 6, 0, 0, 2, 32, 0, 0, 12, 30, 0, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(25) = 3 because we have [25], [16, 9] and [9, 16].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`(i*(i+1)*(2*i+1)/6-1n, 0, b(n-i^2, i-1, p+1))+b(n, i-1, p)))
        end:
    a:= n-> b(n, isqrt(n), 0):
    seq(a(n), n=0..87);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i(i+1)(2i+1)/6 - 1 < n, 0, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n, Floor@Sqrt[n], 0];
    a /@ Range[0, 87] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

A385604 Number of compositions of n such that the odd parts are weakly increasing.

Original entry on oeis.org

1, 1, 2, 4, 7, 14, 25, 48, 86, 162, 292, 541, 978, 1794, 3247, 5919, 10712, 19451, 35184, 63729, 115199, 208327, 376333, 679842, 1227403, 2215695, 3998408, 7214274, 13014001, 23472678, 42331028, 76330880, 137627168, 248122171, 447301570, 806312371, 1453405651
Offset: 0

Views

Author

John Tyler Rascoe, Aug 02 2025

Keywords

Examples

			a(5) = 14 counts all compositions of n = 5 except (1,3,1) and (3,1,1) since the odd parts are not weakly increasing.
The composition of n = 13 (2,1,1,4,2,3) has odd parts (1,1,3), so it is counted under a(13) = 1794.
		

Crossrefs

Programs

  • PARI
    A_x(N) = {my(x='x+O('x^(N+1))); Vec((1-x^2)/(1-2*x^2)/prod(i=0,N, 1-x^(2*i+1)*(1-x^2)/(1-2*x^2)))}

Formula

G.f.: (1 - x^2)/( (1 - 2*x^2) * Product_{i>=0} (1 - x^(2*i + 1) * (1 - x^2)/(1 - 2*x^2)) ).

A331980 Number of compositions (ordered partitions) of n into distinct odd parts > 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 2, 1, 2, 1, 4, 1, 4, 7, 6, 7, 6, 13, 8, 19, 8, 25, 34, 31, 34, 43, 60, 49, 84, 61, 134, 73, 158, 205, 232, 217, 280, 355, 378, 487, 450, 745, 572, 1003, 668, 1381, 1558, 1759, 1678, 2383, 2592, 3001, 3480, 3865, 5162, 4729, 6794, 5953, 9964
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 60; CoefficientList[Series[Sum[k! x^(k (k + 2))/Product[(1 - x^(2 j)), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(k + 2)) / Product_{j=1..k} (1 - x^(2*j)).
Previous Showing 21-26 of 26 results.