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

%I #50 Jan 04 2024 19:48:43

%S 1,0,1,1,2,2,4,5,9,14,24,40,70,120,211,371,658,1172,2102,3786,6856,

%T 12470,22782,41789,76947,142180,263578,490104,913858,1708386,3201290,

%U 6011962,11313274,21329276,40282947,76202831,144370582,273906268,520359324,989804122,1884992934,3593832942,6859139352,13104584156,25061042050,47971076906,91906883496

%N a(n) = 2 * A079500(n) - A079500(n+1).

%C Arises in studying a conjecture related to lunar divisors in base 2.

%C 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 Alois P. Heinz, <a href="/A188541/b188541.txt">Table of n, a(n) for n = 0..3343</a>

%H 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 G.f.: Sum_{n>=0} x^(2*n)/(1 - Sum_{k=1..n} x^k). - _Joerg Arndt_, Jan 04 2024

%e From _Joerg Arndt_, Jan 04 2024: (Start)

%e There are a(10) = 24 compositions of 10 of the specified type:

%e 1: [ 2 1 1 1 1 1 1 1 1 ]

%e 2: [ 4 1 1 1 1 1 1 ]

%e 3: [ 4 1 1 1 1 2 ]

%e 4: [ 4 1 1 1 2 1 ]

%e 5: [ 4 1 1 2 1 1 ]

%e 6: [ 4 1 1 2 2 ]

%e 7: [ 4 1 2 1 1 1 ]

%e 8: [ 4 1 2 1 2 ]

%e 9: [ 4 1 2 2 1 ]

%e 10: [ 4 2 1 1 1 1 ]

%e 11: [ 4 2 1 1 2 ]

%e 12: [ 4 2 1 2 1 ]

%e 13: [ 4 2 2 1 1 ]

%e 14: [ 4 2 2 2 ]

%e 15: [ 6 1 1 1 1 ]

%e 16: [ 6 1 1 2 ]

%e 17: [ 6 1 2 1 ]

%e 18: [ 6 1 3 ]

%e 19: [ 6 2 1 1 ]

%e 20: [ 6 2 2 ]

%e 21: [ 6 3 1 ]

%e 22: [ 8 1 1 ]

%e 23: [ 8 2 ]

%e 24: [ 10 ]

%e (End)

%p b:= proc(n, m) option remember; `if`(n=0, 1,

%p `if`(m=0, add(b(n-j, j), j=1..n),

%p add(b(n-j, min(n-j, m)), j=1..min(n, m))))

%p end:

%p a:= n-> 2*b(n, 0)-b(n+1, 0):

%p seq(a(n), n=0..46); # _Alois P. Heinz_, Jan 04 2024

%t 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 a79500[n_] := b[n, 0];

%t a[n_] := -a79500[n+1] + 2 a79500[n];

%t Table[a[n], {n, 0, 48}] (* _Jean-François Alcover_, Sep 15 2018, after _Alois P. Heinz_ in A079500 *)

%o (SageMath)

%o def C(n): return sum(Compositions(n, max_part=k, inner=[k]).cardinality()

%o for k in (0..n))

%o def a(n): return 2*C(n) - C(n+1) if n > 0 else 1

%o print([a(n) for n in (0..18)]) # _Peter Luschny_, Jan 04 2024

%Y Cf. A079500.

%K nonn

%O 0,5

%A _N. J. A. Sloane_, Apr 03 2011

%E Offset changed to 0 by _N. J. A. Sloane_, Jan 04 2024 at the suggestion of _Joerg Arndt_.

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 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)