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!)
A342527 Number of compositions of n with alternating parts equal. 18
1, 1, 2, 4, 6, 8, 11, 12, 16, 17, 21, 20, 29, 24, 31, 32, 38, 32, 46, 36, 51, 46, 51, 44, 69, 51, 61, 60, 73, 56, 87, 60, 84, 74, 81, 76, 110, 72, 91, 88, 115, 80, 123, 84, 117, 112, 111, 92, 153, 101, 132, 116, 139, 104, 159, 120, 161, 130, 141, 116, 205, 120, 151, 156, 178, 142, 195, 132, 183, 158 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
These are finite sequences q of positive integers summing to n such that q(i) = q(i+2) for all possible i.
LINKS
FORMULA
a(n) = 1 + n + A000203(n) - 2*A000005(n).
a(n) = A065608(n) + A062968(n).
EXAMPLE
The a(1) = 1 through a(8) = 16 compositions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (12) (13) (14) (15) (16) (17)
(21) (22) (23) (24) (25) (26)
(111) (31) (32) (33) (34) (35)
(121) (41) (42) (43) (44)
(1111) (131) (51) (52) (53)
(212) (141) (61) (62)
(11111) (222) (151) (71)
(1212) (232) (161)
(2121) (313) (242)
(111111) (12121) (323)
(1111111) (1313)
(2222)
(3131)
(21212)
(11111111)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], SameQ@@Plus@@@Reverse/@Partition[#, 2, 1]&]], {n, 0, 15}]
CROSSREFS
The odd-length case is A062968.
The even-length case is A065608.
The version with alternating parts unequal is A224958 (unordered: A000726).
The version with alternating parts weakly decreasing is A342528.
A000005 counts constant compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A175342 counts compositions with constant differences.
A342495 counts compositions with constant first quotients.
A342496 counts partitions with constant first quotients (strict: A342515, ranking: A342522).
Sequence in context: A187414 A187348 A081499 * A117638 A128403 A205556
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 24 2021
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)