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.

A097896 Number of compositions of n with either all parts odd or all parts even.

This page as a plain text file.
%I A097896 #12 Jul 27 2015 15:17:00
%S A097896 1,2,2,5,5,12,13,29,34,71,89,176,233,441,610,1115,1597,2840,4181,7277,
%T A097896 10946,18735,28657,48416,75025,125489,196418,326003,514229,848424,
%U A097896 1346269,2211077,3524578,5768423,9227465,15061424,24157817,39350313
%N A097896 Number of compositions of n with either all parts odd or all parts even.
%C A097896 Number of compositions of n with only even parts is 0 if n is odd, or 2^((n-2)/2) if n is even.
%H A097896 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1, 3, -2, -2).
%F A097896 a(2*n-1) = Fibonacci(2*n-1), a(2*n) = 2^(n-1)+Fibonacci(2*n). - _Vladeta Jovovic_, Sep 05 2004
%F A097896 a(n)= +a(n-1) +3*a(n-2) -2*a(n-3) -2*a(n-4). G.f.: -x*(-1-x+x^3+3*x^2)/ ((2*x^2-1) * (x^2+x-1)). - _R. J. Mathar_, Feb 06 2010
%e A097896 For n=4: 1+1+1+1, 3+1, 1+3, 2+2, 4: total=5 so a(n)=5.
%t A097896 f[n_] := Block[{}, Fibonacci[n] + If[EvenQ[n], 2^(n/2 - 1), 0]]; Table[ f[n], {n, 22}] (* _Robert G. Wilson v_, Sep 06 2004 *)
%t A097896 LinearRecurrence[{1,3,-2,-2},{1,2,2,5},40] (* _Harvey P. Dale_, Nov 27 2012 *)
%Y A097896 Cf. A096441, A000045.
%K A097896 nonn
%O A097896 1,2
%A A097896 Dubois Marcel (dubois.ml(AT)club-internet.fr), Sep 03 2004
%E A097896 More terms from _Robert G. Wilson v_, Sep 06 2004