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.
%I A188541 #50 Jan 04 2024 19:48:43 %S A188541 1,0,1,1,2,2,4,5,9,14,24,40,70,120,211,371,658,1172,2102,3786,6856, %T A188541 12470,22782,41789,76947,142180,263578,490104,913858,1708386,3201290, %U A188541 6011962,11313274,21329276,40282947,76202831,144370582,273906268,520359324,989804122,1884992934,3593832942,6859139352,13104584156,25061042050,47971076906,91906883496 %N A188541 a(n) = 2 * A079500(n) - A079500(n+1). %C A188541 Arises in studying a conjecture related to lunar divisors in base 2. %C A188541 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 %H A188541 Alois P. Heinz, <a href="/A188541/b188541.txt">Table of n, a(n) for n = 0..3343</a> %H A188541 D. Applegate, M. LeBrun and N. J. A. Sloane, <a href="http://arxiv.org/abs/1107.1130">Dismal Arithmetic</a>, 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] %F A188541 G.f.: Sum_{n>=0} x^(2*n)/(1 - Sum_{k=1..n} x^k). - _Joerg Arndt_, Jan 04 2024 %e A188541 From _Joerg Arndt_, Jan 04 2024: (Start) %e A188541 There are a(10) = 24 compositions of 10 of the specified type: %e A188541 1: [ 2 1 1 1 1 1 1 1 1 ] %e A188541 2: [ 4 1 1 1 1 1 1 ] %e A188541 3: [ 4 1 1 1 1 2 ] %e A188541 4: [ 4 1 1 1 2 1 ] %e A188541 5: [ 4 1 1 2 1 1 ] %e A188541 6: [ 4 1 1 2 2 ] %e A188541 7: [ 4 1 2 1 1 1 ] %e A188541 8: [ 4 1 2 1 2 ] %e A188541 9: [ 4 1 2 2 1 ] %e A188541 10: [ 4 2 1 1 1 1 ] %e A188541 11: [ 4 2 1 1 2 ] %e A188541 12: [ 4 2 1 2 1 ] %e A188541 13: [ 4 2 2 1 1 ] %e A188541 14: [ 4 2 2 2 ] %e A188541 15: [ 6 1 1 1 1 ] %e A188541 16: [ 6 1 1 2 ] %e A188541 17: [ 6 1 2 1 ] %e A188541 18: [ 6 1 3 ] %e A188541 19: [ 6 2 1 1 ] %e A188541 20: [ 6 2 2 ] %e A188541 21: [ 6 3 1 ] %e A188541 22: [ 8 1 1 ] %e A188541 23: [ 8 2 ] %e A188541 24: [ 10 ] %e A188541 (End) %p A188541 b:= proc(n, m) option remember; `if`(n=0, 1, %p A188541 `if`(m=0, add(b(n-j, j), j=1..n), %p A188541 add(b(n-j, min(n-j, m)), j=1..min(n, m)))) %p A188541 end: %p A188541 a:= n-> 2*b(n, 0)-b(n+1, 0): %p A188541 seq(a(n), n=0..46); # _Alois P. Heinz_, Jan 04 2024 %t A188541 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]}]]]; %t A188541 a79500[n_] := b[n, 0]; %t A188541 a[n_] := -a79500[n+1] + 2 a79500[n]; %t A188541 Table[a[n], {n, 0, 48}] (* _Jean-François Alcover_, Sep 15 2018, after _Alois P. Heinz_ in A079500 *) %o A188541 (SageMath) %o A188541 def C(n): return sum(Compositions(n, max_part=k, inner=[k]).cardinality() %o A188541 for k in (0..n)) %o A188541 def a(n): return 2*C(n) - C(n+1) if n > 0 else 1 %o A188541 print([a(n) for n in (0..18)]) # _Peter Luschny_, Jan 04 2024 %Y A188541 Cf. A079500. %K A188541 nonn %O A188541 0,5 %A A188541 _N. J. A. Sloane_, Apr 03 2011 %E A188541 Offset changed to 0 by _N. J. A. Sloane_, Jan 04 2024 at the suggestion of _Joerg Arndt_.