cp's OEIS Frontend

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.

A242499 Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 1.

This page as a plain text file.
%I A242499 #14 Dec 28 2020 04:23:54
%S A242499 1,0,1,3,1,9,11,18,51,65,151,290,477,1043,1835,3486,6931,12540,24607,
%T A242499 46797,87979,171072,323269,619245,1190619,2264925,4357211,8343322,
%U A242499 15973309,30711853,58846191,113027716,217192103,416964202,801880039,1541412015,2963997227
%N A242499 Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 1.
%C A242499 With offset 2 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -1.
%H A242499 Alois P. Heinz, <a href="/A242499/b242499.txt">Table of n, a(n) for n = 1..1000</a>
%F A242499 Recurrence (for n>=5): (n+2)*(16*n^4 - 128*n^3 + 344*n^2 - 352*n + 89)*a(n) = -32*(n+1)*(2*n-5)*a(n-1) + 2*(16*n^5 - 112*n^4 + 264*n^3 - 320*n^2 + 301*n - 89)*a(n-2) + 2*(2*n-5)*(16*n^4 - 80*n^3 + 80*n^2 + 36*n - 53)*a(n-3) - (n-4)*(16*n^4 - 64*n^3 + 56*n^2 + 16*n - 31)*a(n-4). - _Vaclav Kotesovec_, May 20 2014
%p A242499 a:= proc(n) option remember;
%p A242499       `if`(n<6, [0, 1, 0, 1, 3, 1][n+1],
%p A242499       ((3*n-2)*a(n-2) +(4*n+2)*a(n-3) -(3*n-10)*a(n-4)
%p A242499        -(4*n-22)*a(n-5) +(n-6)*a(n-6))/(n+2))
%p A242499     end:
%p A242499 seq(a(n), n=1..50);
%t A242499 a[n_] := a[n] = If[n<6, {0, 1, 0, 1, 3, 1}[[n+1]], ((3n-2)a[n-2] + (4n+2)a[n-3] - (3n-10)a[n-4] - (4n-22)a[n-5] + (n-6)a[n-6])/(n+2)];
%t A242499 Array[a, 50] (* _Jean-François Alcover_, Dec 28 2020, after _Alois P. Heinz_ *)
%Y A242499 Column k=1 of A242498.
%K A242499 nonn
%O A242499 1,4
%A A242499 _Alois P. Heinz_, May 16 2014