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 A051500 #33 Sep 20 2024 06:31:35 %S A051500 1,4,25,196,1681,14884,133225,1196836,10764961,96864964,871725625, %T A051500 7845353476,70607649841,635467254244,5719200505225,51472790198116, %U A051500 463255068736321,4169295489486724,37523659017960025,337712929999378756,3039416366507624401 %N A051500 a(n) = (3^n + 1)^2/4. %C A051500 For n>0, 4*a(n) has the form 10...020...01 when it is converted to base 3. The number of zeros between 2 consecutive nonzero digits is n-1. - _Raul Prisacariu_, Aug 27 2024 %H A051500 Colin Barker, <a href="/A051500/b051500.txt">Table of n, a(n) for n = 0..1000</a> %H A051500 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (13,-39,27). %F A051500 a(n) = A007051(n)^2. - _Michel Marcus_, Jun 08 2013 %F A051500 From _Colin Barker_, Feb 10 2016: (Start) %F A051500 a(n) = 13*a(n-1) - 39*a(n-2) + 27*a(n-3) for n > 2. %F A051500 G.f.: (1-9*x+12*x^2) / ((1-x)*(1-3*x)*(1-9*x)). (End) %F A051500 E.g.f.: (1/4)*(exp(x) + 2*exp(3*x) + exp(9*x)). - _G. C. Greubel_, May 22 2023 %t A051500 (3^Range[0,20]+1)^2/4 (* or *) LinearRecurrence[{13,-39,27},{1,4,25},30] (* _Harvey P. Dale_, Nov 05 2016 *) %o A051500 (PARI) Vec((1-9*x+12*x^2)/((1-x)*(1-3*x)*(1-9*x)) + O(x^30)) \\ _Colin Barker_, Feb 10 2016 %o A051500 (Python) %o A051500 def A051500(n): return (3**n+1)**2>>2 # _Chai Wah Wu_, Nov 14 2022 %o A051500 (Magma) [(3^n+1)^2/4: n in [0..40]]; // _G. C. Greubel_, May 22 2023 %o A051500 (SageMath) [((3^n+1)//2)^2 for n in range(41)] # _G. C. Greubel_, May 22 2023 %Y A051500 Cf. A007051. %K A051500 nonn,easy %O A051500 0,2 %A A051500 _Colin Mallows_