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 A071954 #48 Feb 16 2022 23:15:35 %S A071954 2,4,10,32,114,420,1562,5824,21730,81092,302634,1129440,4215122, %T A071954 15731044,58709050,219105152,817711554,3051741060,11389252682, %U A071954 42505269664,158631825970,592022034212,2209456310874,8245803209280,30773756526242,114849222895684 %N A071954 a(n) = 4*a(n-1) - a(n-2) - 4, with a(0) = 2, a(1) = 4. %C A071954 a(n) gives the side of a cube having a square number of cubes in its two outermost layers, i.e., solutions p to the equation p^3 - (p - 4)^3 = q^2. The corresponding q is given by 4*A001075(n). %D A071954 M. E. Larsen, "Four Cubes" in Puzzler's Tribute, Ed. D. Wolfe & T. Rodgers, pp. 69-70, A. K. Peters, MA, 2002 %H A071954 G. C. Greubel, <a href="/A071954/b071954.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..100 from Reinhard Zumkeller) %H A071954 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (5,-5,1). %F A071954 a(n) = 5*a(n-1) - 5*a(n-2) + a(n-3) for n > 2, with a(0) = 2, a(1) = 4, a(2) = 10. %F A071954 G.f.: 2*(1 - 3*x)/((1-x)*(1 -4*x +x^2)). - _Harvey P. Dale_, May 05 2011 %F A071954 a(n) = (2 + (-(2 - sqrt(3))^n + (2 + sqrt(3))^n)/sqrt(3)). - _Colin Barker_, Nov 03 2016 %F A071954 A263942(n) = -a(-1-n) for all n in Z. - _Michael Somos_, Nov 03 2016 %F A071954 E.g.f.: (2/3)*(3*exp(x) + sqrt(3)*exp(2*x)*sinh(sqrt(3)*x)). - _Franck Maminirina Ramaharo_, Nov 14 2018 %F A071954 From _G. C. Greubel_, Feb 25 2019: (Start) %F A071954 a(n) = 2*A072110(n). %F A071954 a(n) = 2*(1 - (-i)^(n+1)*F(n, 4*i)), where i=sqrt(-1) and F(n,x) is the Fibonacci polynomial. (End) %e A071954 G.f. = 2 + 4*x + 10*x^2 + 32*x^3 + 114*x^4 + 420*x^5 + 1562*x^6 + ... %t A071954 a[n_]:= a[n] = 4*a[n-1] -a[n-2] -4; a[0]=2; a[1]=4; Table[a[n], {n,0,30}] %t A071954 LinearRecurrence[{5,-5,1},{2,4,10},30] (* _Harvey P. Dale_, May 05 2011 *) %o A071954 (Haskell) %o A071954 a071954 n = a071954_list !! n %o A071954 a071954_list = 2 : 4 : zipWith (-) %o A071954 (map ((4 *) . pred) (tail a071954_list)) a071954_list %o A071954 -- _Reinhard Zumkeller_, Aug 11 2011 %o A071954 (PARI) Vec((2-6*x)/(1-5*x+5*x^2-x^3)+O(x^30)) \\ _Charles R Greathouse IV_, Feb 09 2012 %o A071954 (PARI) {a(n) = my(w=quadgen(12)); simplify( 2 + ((2+w)^n - (2-w)^n) / w)}; /* _Michael Somos_, Nov 03 2016 */ %o A071954 (Magma) I:=[2,4,10]; [n le 3 select I[n] else 5*Self(n-1) -5*Self(n-2) + Self(n-3): n in [1..30]]; // _G. C. Greubel_, Feb 25 2019 %o A071954 (Sage) (2*(1-3*x)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Feb 25 2019 %o A071954 (GAP) a:=[2,4,10];; for n in [4..30] do a[n]:=5*a[n-1]-5*a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Feb 25 2019 %Y A071954 Equals A052530(n) + 2, n > 0. %Y A071954 Cf. A001075, A003699, A072110, A263942. %K A071954 nice,nonn,easy %O A071954 0,1 %A A071954 _Lekraj Beedassy_, Jun 25 2002 %E A071954 Edited by _Robert G. Wilson v_, Jun 27 2002