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

A246690 Number A(n,k) of compositions of n into parts of the k-th list of distinct parts in the order given by A246688; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 1, 0, 1, 1, 5, 0, 1, 0, 1, 1, 0, 2, 0, 8, 1, 1, 0, 1, 0, 1, 0, 3, 0, 13, 0, 1, 0, 1, 0, 1, 1, 1, 4, 1, 21, 1, 1, 0, 1, 1, 0, 1, 2, 0, 6, 0, 34, 0, 1, 0, 1, 1, 2, 0, 1, 3, 0, 9, 0, 55, 1, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 01 2014

Keywords

Comments

The first lists of distinct parts in the order given by A246688 are: 0:[], 1:[1], 2:[2], 3:[1,2], 4:[3], 5:[1,3], 6:[4], 7:[1,4], 8:[2,3], 9:[5], 10:[1,2,3], 11:[1,5], 12:[2,4], 13:[6], 14:[1,2,4], 15:[1,6], 16:[2,5], 17:[3,4], 18:[7], 19:[1,2,5], 20:[1,3,4], ... .

Examples

			Square array A(n,k) begins:
  1, 1, 1,  1, 1,  1, 1,  1, 1, 1,   1, 1, 1, 1,   1, ...
  0, 1, 0,  1, 0,  1, 0,  1, 0, 0,   1, 1, 0, 0,   1, ...
  0, 1, 1,  2, 0,  1, 0,  1, 1, 0,   2, 1, 1, 0,   2, ...
  0, 1, 0,  3, 1,  2, 0,  1, 1, 0,   4, 1, 0, 0,   3, ...
  0, 1, 1,  5, 0,  3, 1,  2, 1, 0,   7, 1, 2, 0,   6, ...
  0, 1, 0,  8, 0,  4, 0,  3, 2, 1,  13, 2, 0, 0,  10, ...
  0, 1, 1, 13, 1,  6, 0,  4, 2, 0,  24, 3, 3, 1,  18, ...
  0, 1, 0, 21, 0,  9, 0,  5, 3, 0,  44, 4, 0, 0,  31, ...
  0, 1, 1, 34, 0, 13, 1,  7, 4, 0,  81, 5, 5, 0,  55, ...
  0, 1, 0, 55, 1, 19, 0, 10, 5, 0, 149, 6, 0, 0,  96, ...
  0, 1, 1, 89, 0, 28, 0, 14, 7, 1, 274, 8, 8, 0, 169, ...
		

Crossrefs

Main diagonal gives A246691.
Cf. A246688, A246720 (the same for partitions).

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    f:= proc() local i, l; i, l:=0, [];
          proc(n) while n>=nops(l)
            do l:=[l[], b(i, 1)[]]; i:=i+1 od; l[n+1]
          end
        end():
    g:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(i>n, 0, g(n-i, l)), i=l))
        end:
    A:= (n, k)-> g(n, f(k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i>n, {}, Join[Prepend[#, i]& /@ b[n - i, i + 1], b[n, i + 1]]]];
    f = Module[{i = 0, l = {}}, Function[n, While[n >= Length[l], l = Join[l, b[i, 1]]; i++]; l[[n + 1]]]];
    g[n_, l_] := g[n, l] = If[n==0, 1, Sum[If[i>n, 0, g[n - i, l]], {i, l}]];
    A[n_, k_] := g[n, f[k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 07 2020, after Alois P. Heinz *)

A245367 Compositions of n into parts 3, 5 and 7.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 1, 3, 3, 3, 6, 5, 8, 10, 11, 17, 18, 25, 32, 37, 52, 61, 79, 102, 123, 163, 200, 254, 326, 402, 519, 649, 819, 1045, 1305, 1664, 2096, 2643, 3358, 4220, 5352, 6759, 8527, 10806, 13622, 17237, 21785, 27501, 34802, 43934, 55544, 70209, 88672, 112131, 141644, 179018, 226274, 285860, 361358
Offset: 0

Views

Author

David Neil McGrath, Aug 20 2014

Keywords

Examples

			a(16) = 10: the compositions are the permutations of [5533] (there are 4!/2!2!=6 of them) and the permutations of [7333] (there are 4!/3!=4).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,1,0,1,0,1},{1,0,0,1,0,1,1},70] (* Harvey P. Dale, Jan 27 2017 *)
  • PARI
    Vec(1/(1-x^3-x^5-x^7) +O(x^66)) \\ Joerg Arndt, Aug 20 2014

Formula

G.f: 1/(1-x^3-x^5-x^7).
a(n) = a(n-3) + a(n-5) + a(n-7).

A217283 Expansion of 1/(1 -x -x^2 -x^6 -x^24 - ... -x^(k!) - ... ).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 23, 39, 65, 109, 182, 305, 510, 854, 1429, 2392, 4003, 6700, 11213, 18767, 31409, 52568, 87980, 147249, 246443, 412461, 690316, 1155350, 1933654, 3236267, 5416387, 9065154, 15171922, 25392535, 42498293, 71127400, 119042590, 199235998, 333451939, 558082864, 934037099
Offset: 0

Views

Author

Joerg Arndt, Sep 30 2012

Keywords

Comments

Number of compositions of n into parts 1, 2, 6, 24, ..., k!, ...
The first terms are the same as for A120400, but the two sequences are different.

Programs

  • Maple
    a:= proc(n) option remember; local i, s; if n=0 then 1
          else s:=0; for i while i!<=n do s:=s+a(n-i!) od; s fi
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 14 2013
  • Mathematica
    nn=41;CoefficientList[Series[1/(1-Sum[x^(i!),{i,1,10}]),{x,0,nn}],x] (* Geoffrey Critzer, Sep 29 2013 *)
  • PARI
    N=66;  x='x+O('x^N);
    /* choose upper limit b in following sum such that b! > N */
    Vec( 1/( 1 - sum(k=1,7, x^(k!) ) ) )

Formula

G.f.: 1/(1 - Sum_{k>=1} x^k! ).
Showing 1-3 of 3 results.