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 A136408 #28 Feb 05 2025 22:25:36 %S A136408 1,2,4,7,13,27,55,107,211,427,859,1707,3403,6827,13675,27307,54571, %T A136408 109227,218539,436907,873643,1747627,3495595,6990507,13980331, %U A136408 27962027,55925419,111848107,223693483,447392427,894790315,1789569707,3579128491 %N A136408 a(n) = 3*a(n-1) - 4*a(n-2) + 6*a(n-3) - 4*a(n-4), with initial terms 1,2,4,7. %H A136408 G. C. Greubel, <a href="/A136408/b136408.txt">Table of n, a(n) for n = 0..1000</a> %H A136408 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4,6,-4). %F A136408 From _R. J. Mathar_, Apr 04 2008: (Start) %F A136408 O.g.f.: (1 - x + 2*x^2 - 3*x^3)/((1-x)*(1-2*x)*(1+2*x^2)). %F A136408 a(n) = (5*2^n + 2 - A077966(n))/6. (End) %t A136408 LinearRecurrence[{3,-4,6,-4},{1,2,4,7},41] (* _Harvey P. Dale_, Aug 12 2016 *) %o A136408 (PARI) a(n)=(5<<n - imag(quadgen(-8)^(n+1)) + 2)/6 \\ _Charles R Greathouse IV_, Mar 30 2022 %o A136408 (Magma) [(5*2^n +2 -((n+1) mod 2)*(-2)^Floor((n+1)/2))/6: n in [0..40]]; // _G. C. Greubel_, Jan 19 2023 %o A136408 (SageMath) [(5*2^n +2 -((n+1)%2)*(-2)^((n+1)//2))/6 for n in range(41)] # _G. C. Greubel_, Jan 19 2023 %Y A136408 Cf. A077966. %K A136408 nonn,easy %O A136408 0,2 %A A136408 _Paul Curtz_, Mar 31 2008 %E A136408 More terms from _R. J. Mathar_, Apr 04 2008