login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246691 Number of compositions of n into parts of the n-th list of distinct parts in the order given by A246688. 3
1, 1, 1, 3, 0, 4, 0, 5, 4, 0, 274, 11, 13, 0, 1601, 21, 11, 10, 0, 15571, 7921, 53, 41, 12, 1, 246441, 64208, 119, 16169, 47, 89, 35, 0, 1439975216, 17319590, 1835123, 956698, 531, 274291, 0, 82, 0, 0, 428262742476, 1923714115, 72992449, 20086406, 1915, 4051405 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
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], ... .
LINKS
FORMULA
a(n) = A246690(n,n).
EXAMPLE
a(7) = 5 because there are 5 compositions of 7 into parts 1, 4: [1,1,1,1,1,1,1], [1,1,1,4], [1,1,4,1], [1,4,1,1], [4,1,1,1].
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-> g(n, f(n)):
seq(a(n), n=0..80);
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_] := g[n, f[n]];
Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)
CROSSREFS
Cf. A246688, A246690, A246721 (the same for partitions).
Sequence in context: A218859 A363028 A364067 * A066705 A277894 A027636
KEYWORD
nonn,look
AUTHOR
Alois P. Heinz, Sep 01 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:42 EDT 2024. Contains 371905 sequences. (Running on oeis4.)