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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A368557 Number of compositions of n such that the set of absolute differences is a subset of the set of parts. 1
 1, 1, 1, 3, 2, 2, 11, 10, 13, 27, 58, 87, 157, 253, 438, 850, 1462, 2474, 4472, 7716, 13544, 24115, 42360, 74013, 131038, 229009, 401946, 707293, 1242059, 2177682, 3828831, 6716062, 11777179, 20678592, 36267148, 63586772, 111556751, 195610763, 342949281 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS Table of n, a(n) for n=0..38. John Tyler Rascoe, Python program EXAMPLE For n=12, composition [2,1,2,4,3] of 12 has the set of absolute differences {1,2}, which is a subset of the set of parts {1,2,3,4}, so it counts towards a(12) = 157. a(3) = 3 compositions: [3], [2,1], [1,2]. a(6) = 11 compositions: [6], [4,2], [2,4], [3,2,1], [3,1,2], [2,3,1], [2,1,3], [1,3,2], [1,2,3], [2,1,2,1], [1,2,1,2]. MATHEMATICA g[0] = {{}}; g[n_Integer] := g[n] = Flatten[ParallelTable[Append[#, i] & /@ g[n - i], {i, 1, n}], 1]; isC[p_List] := Module[{d}, d = Abs[Differences[p]]; Union[d] === Union[Select[d, MemberQ[p, #] &]]]; a[n_Integer] := a[n] = Count[g[n], p_ /; isC[p]]; Monitor[Table[a[n], {n, 0, 19}], {n, Table[a[m], {m, 0, n - 1}]}] (* Robert P. P. McKone, Jan 02 2024 *) CROSSREFS Cf. A003242, A032020, A173258, A214248, A214270. Sequence in context: A119954 A100804 A143175 * A074248 A266004 A206703 Adjacent sequences: A368554 A368555 A368556 * A368558 A368559 A368560 KEYWORD nonn AUTHOR John Tyler Rascoe, Dec 29 2023 EXTENSIONS a(24)-a(38) from Alois P. Heinz, Dec 30 2023 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.

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)