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!)
A218355 Number of partitions into distinct parts where all differences between consecutive parts are odd and the minimal part is even. 3

%I #24 Feb 25 2020 05:47:03

%S 1,0,1,0,1,1,1,1,1,3,1,3,1,5,2,6,2,8,3,9,5,12,7,13,9,16,13,19,17,22,

%T 23,25,29,30,37,35,46,41,58,49,70,57,85,68,103,81,123,97,145,115,172,

%U 139,201,164,236,197,274,234,318,280,368,330,425,394,488,463,561,548,644,642,738,755,844,879,965,1029

%N Number of partitions into distinct parts where all differences between consecutive parts are odd and the minimal part is even.

%C Parts are even, odd, even, odd, ... .

%H Alois P. Heinz, <a href="/A218355/b218355.txt">Table of n, a(n) for n = 0..10000</a>

%F G.f.: sum(n>=0, x^((n+1)*(n+4)/2) / prod(k=1..n+1, 1-x^(2*k) ) ).

%F a(n) = A179080(n) - A179049(n).

%e The a(23) = 13 such partitions of 23 are:

%e [ 1] 2 3 18

%e [ 2] 2 5 16

%e [ 3] 2 7 14

%e [ 4] 2 9 12

%e [ 5] 2 21

%e [ 6] 4 5 14

%e [ 7] 4 7 12

%e [ 8] 4 9 10

%e [ 9] 4 19

%e [10] 6 7 10

%e [11] 6 17

%e [12] 8 15

%e [13] 10 13

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

%p `if`(i>n, 0, b(n, i+2)+b(n-i, i+1)))

%p end:

%p a:= n-> b(n, 2):

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Nov 08 2012; revised Feb 24 2020

%t b[n_, i_, t_] := b[n, i, t] = If[n==0, 1-Mod[t, 2], If[i<1, 0, b[n, i-1, t] + If[i <= n && Mod[i, 2] != t, b[n-i, i-1, Mod[i, 2]], 0]]]; a[n_] := If[n==0, 1, Sum[ b[n-i, i-1, Mod[i, 2]], {i, 1, n}]]; Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jul 02 2015, after _Alois P. Heinz_ *)

%o (PARI)

%o N=76; x='x+O('x^N);

%o gf179080 = sum(n=0, N, x^(n*(n+1)/2) / prod(k=1, n+1, 1-x^(2*k) ) );

%o gf179049 = sum(n=0, N, x^(n*(n+1)/2) / prod(k=1, n, 1-x^(2*k) ) );

%o gf = gf179080 - gf179049;

%o Vec( gf )

%o (PARI) N=75; x='x+O('x^N); gf = sum(n=0, N, x^((n+1)*(n+4)/2) / prod(k=1, n+1, 1-x^(2*k) ) ); v2=Vec( gf )

%o (Sage) # After _Alois P. Heinz_.

%o def A218355(n):

%o @cached_function

%o def h(n, k):

%o if n == 0: return 1

%o if k > n: return 0

%o return h(n, k+2) + h(n-k, k+1)

%o return h(n, 2)

%o print([A218355(n) for n in range(76)]) # _Peter Luschny_, Feb 25 2020

%Y Cf. A179049 (parts are odd, even, odd, even, ...).

%K nonn

%O 0,10

%A _Joerg Arndt_, Oct 27 2012

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)