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 A113980 #19 Aug 15 2019 07:27:36 %S A113980 1,0,3,2,10,12,36,56,136,240,528,992,2080,4032,8256,16256,32896,65280, %T A113980 131328,261632,524800,1047552,2098176,4192256,8390656,16773120, %U A113980 33558528,67100672,134225920,268419072,536887296,1073709056,2147516416 %N A113980 Number of compositions of n with an odd number of 1's. %H A113980 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-4). %F A113980 a(n) = 2^(n-2)-2^((n-2)/2) if n is even, else a(n) = 2^(n-2)+2^((n-3)/2). %F A113980 G.f.: z(1-z)^2/[(1-2z)(1-2z^2)]. - _Emeric Deutsch_, Feb 03 2006 %F A113980 G.f.: 1 + x + Q(0), where Q(k)= 1 - 1/(2^k - 2*x*2^(2*k)/(2*x*2^k - 1/(1 + 1/(2*2^k - 8*x*2^(2*k)/(4*x*2^k + 1/Q(k+1)))))); (continued fraction). - _Sergei N. Gladkovskii_, May 22 2013 %e A113980 a(4)=2 because only the compositions 31 and 13 of 4 have an odd number of 1's (the other compositions are 4,22,211,121,112 and 1111). %p A113980 a:=proc(n) if n mod 2 = 0 then 2^(n-2)-2^((n-2)/2) else 2^(n-2)+2^((n-3)/2) fi end: seq(a(n),n=1..38); # _Emeric Deutsch_, Feb 01 2006 %t A113980 f[n_] := If[EvenQ[n], 2^(n - 2) - 2^((n - 2)/2), 2^(n - 2) + 2^((n - 3)/2)]; Array[f, 34] (* _Robert G. Wilson v_, Feb 01 2006 *) %Y A113980 Cf. A020522, A007582, A063083, A100818, A092295, A111752, A111753, A111723, A111724, A088336, A088506. %Y A113980 Cf. A105422. %K A113980 easy,nonn %O A113980 1,3 %A A113980 _Vladeta Jovovic_, Jan 31 2006 %E A113980 More terms from _Robert G. Wilson v_ and _Emeric Deutsch_, Feb 01 2006