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.

A025579 a(1)=1, a(2)=2, a(n) = 4*3^(n-3) for n >= 3.

This page as a plain text file.
%I A025579 #46 Apr 09 2023 16:23:30
%S A025579 1,2,4,12,36,108,324,972,2916,8748,26244,78732,236196,708588,2125764,
%T A025579 6377292,19131876,57395628,172186884,516560652,1549681956,4649045868,
%U A025579 13947137604,41841412812,125524238436,376572715308,1129718145924
%N A025579 a(1)=1, a(2)=2, a(n) = 4*3^(n-3) for n >= 3.
%C A025579 a(n) is the sum of the numbers in row n+1 of the array defined in A025564 (and of the array in A024996).
%C A025579 a(n) is the number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2; |s(i) - s(i-1)| <= 1 for i >= 3.
%C A025579 Equals binomial transform of A095342: (1, 1, 5, 5, 17, 25, 61, ...). - _Gary W. Adamson_, Mar 04 2010
%H A025579 Colin Barker, <a href="/A025579/b025579.txt">Table of n, a(n) for n = 1..1000</a>
%H A025579 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (3).
%F A025579 a(n) = A003946(n-2), n>2. - _R. J. Mathar_, May 28 2008
%F A025579 From _Colin Barker_, Oct 29 2019: (Start)
%F A025579 G.f.: x*(1 + x)*(1 - 2*x) / (1 - 3*x).
%F A025579 a(n) = 3*a(n-1) for n>3. (End)
%p A025579 seq( `if`(n<3, n, 4*3^(n-3)), n=1..30); # _G. C. Greubel_, Dec 26 2019
%t A025579 Join[{1,2},4*3^Range[0,30]] (* or *) Join[{1,2},NestList[3#&,4,30]] (* _Harvey P. Dale_, Jun 27 2011 *)
%o A025579 (PARI) a(n)=max(n,4*3^(n-3)) \\ _Charles R Greathouse IV_, Jun 28 2011
%o A025579 (PARI) Vec(x*(1+x)*(1-2*x)/(1-3*x) + O(x^30)) \\ _Colin Barker_, Oct 29 2019
%o A025579 (Magma) [1,2] cat [4*3^(n-3): n in [3..30]]; // _G. C. Greubel_, Dec 26 2019
%o A025579 (Sage) [1,2]+[4*3^(n-3) for n in (3..30)] # _G. C. Greubel_, Dec 26 2019
%o A025579 (GAP) Concatenation([1,2], List([3..30], n-> 4*3^(n-3) )); # _G. C. Greubel_, Dec 26 2019
%Y A025579 Cf. A003946, A024996, A025564, A095342.
%K A025579 nonn,easy
%O A025579 1,2
%A A025579 _Clark Kimberling_
%E A025579 Definition corrected by _R. J. Mathar_, May 28 2008