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!)
A188541 a(n) = 2 * A079500(n) - A079500(n+1). 3
1, 0, 1, 1, 2, 2, 4, 5, 9, 14, 24, 40, 70, 120, 211, 371, 658, 1172, 2102, 3786, 6856, 12470, 22782, 41789, 76947, 142180, 263578, 490104, 913858, 1708386, 3201290, 6011962, 11313274, 21329276, 40282947, 76202831, 144370582, 273906268, 520359324, 989804122, 1884992934, 3593832942, 6859139352, 13104584156, 25061042050, 47971076906, 91906883496 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Arises in studying a conjecture related to lunar divisors in base 2.
a(n) is the number of compositions of n where the first part is even, say, 2*f and the other parts are <= f. - Joerg Arndt, Jan 04 2024
LINKS
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
FORMULA
G.f.: Sum_{n>=0} x^(2*n)/(1 - Sum_{k=1..n} x^k). - Joerg Arndt, Jan 04 2024
EXAMPLE
From Joerg Arndt, Jan 04 2024: (Start)
There are a(10) = 24 compositions of 10 of the specified type:
1: [ 2 1 1 1 1 1 1 1 1 ]
2: [ 4 1 1 1 1 1 1 ]
3: [ 4 1 1 1 1 2 ]
4: [ 4 1 1 1 2 1 ]
5: [ 4 1 1 2 1 1 ]
6: [ 4 1 1 2 2 ]
7: [ 4 1 2 1 1 1 ]
8: [ 4 1 2 1 2 ]
9: [ 4 1 2 2 1 ]
10: [ 4 2 1 1 1 1 ]
11: [ 4 2 1 1 2 ]
12: [ 4 2 1 2 1 ]
13: [ 4 2 2 1 1 ]
14: [ 4 2 2 2 ]
15: [ 6 1 1 1 1 ]
16: [ 6 1 1 2 ]
17: [ 6 1 2 1 ]
18: [ 6 1 3 ]
19: [ 6 2 1 1 ]
20: [ 6 2 2 ]
21: [ 6 3 1 ]
22: [ 8 1 1 ]
23: [ 8 2 ]
24: [ 10 ]
(End)
MAPLE
b:= proc(n, m) option remember; `if`(n=0, 1,
`if`(m=0, add(b(n-j, j), j=1..n),
add(b(n-j, min(n-j, m)), j=1..min(n, m))))
end:
a:= n-> 2*b(n, 0)-b(n+1, 0):
seq(a(n), n=0..46); # Alois P. Heinz, Jan 04 2024
MATHEMATICA
b[n_, m_] := b[n, m] = If[n == 0, 1, If[m == 0, Sum[b[n-j, j], {j, 1, n}], Sum[b[n-j, Min[n-j, m]], {j, 1, Min[n, m]}]]];
a79500[n_] := b[n, 0];
a[n_] := -a79500[n+1] + 2 a79500[n];
Table[a[n], {n, 0, 48}] (* Jean-François Alcover, Sep 15 2018, after Alois P. Heinz in A079500 *)
PROG
(SageMath)
def C(n): return sum(Compositions(n, max_part=k, inner=[k]).cardinality()
for k in (0..n))
def a(n): return 2*C(n) - C(n+1) if n > 0 else 1
print([a(n) for n in (0..18)]) # Peter Luschny, Jan 04 2024
CROSSREFS
Cf. A079500.
Sequence in context: A230380 A127968 A330627 * A037026 A116651 A135586
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 03 2011
EXTENSIONS
Offset changed to 0 by N. J. A. Sloane, Jan 04 2024 at the suggestion of Joerg Arndt.
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 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)