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 A008845 #34 Sep 08 2022 08:44:36 %S A008845 0,48,1680,57120,1940448,65918160,2239277040,76069501248, %T A008845 2584123765440,87784138523760,2982076586042448,101302819786919520, %U A008845 3441313796169221280,116903366249966604048,3971273138702695316400,134906383349641674153600,4582845760749114225906048 %N A008845 Numbers k such that k+1 and k/2+1 are squares. %D A008845 A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 256. %H A008845 Colin Barker, <a href="/A008845/b008845.txt">Table of n, a(n) for n = 0..650</a> %H A008845 Henry Ernest Dudeney, <a href="https://archive.org/stream/AmusementsInMathematicspdf/AmusementsInMathematics#page/n29/mode/2up">Amusements in Mathematics</a>, 1917. See problem 114, "Curious numbers". %H A008845 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (35,-35,1). %F A008845 a(n) = 2*(A008844(n)-1) = 16*A075528(n) = 48*A029546(n). - corrected by _Sean A. Irvine_, Apr 07 2018 %F A008845 a(0)=0, a(1)=48, a(2)=1680, a(n) = 35*a(n-1) - 35*a(n-2) + a(n-3). - _Harvey P. Dale_, May 24 2014 %F A008845 From _Colin Barker_, Mar 02 2016: (Start) %F A008845 a(n) = (-6+(3-2*sqrt(2))*(17+12*sqrt(2))^(-n)+(3+2*sqrt(2))*(17+12*sqrt(2))^n)/4. %F A008845 G.f.: 48*x / ((1-x)*(1-34*x+x^2)). %F A008845 (End) %F A008845 a(n) = 34*a(n-1) - a(n-2) + 48. - _Vincenzo Librandi_, Mar 03 2016 %e A008845 48+1 = 49 = 7^2 and 48/2+1 = 24+1 = 25 = 5^2. %p A008845 seq(coeff(series(48*x/((1-x)*(1-34*x+x^2)), x, n+1), x, n), n = 0..20); # _G. C. Greubel_, Sep 13 2019 %t A008845 LinearRecurrence[{35,-35,1},{0,48,1680},20] (* _Harvey P. Dale_, May 24 2014 *) %o A008845 (PARI) concat(0, Vec(48*x/((1-x)*(1-34*x+x^2)) + O(x^20))) \\ _Colin Barker_, Mar 02 2016 %o A008845 (Magma) I:=[0,48]; [n le 2 select I[n] else 34*Self(n-1) - Self(n-2)+48: n in [1..20]]; // _Vincenzo Librandi_, Mar 03 2016 %o A008845 (Sage) %o A008845 def A008845_list(prec): %o A008845 P.<x> = PowerSeriesRing(ZZ, prec) %o A008845 return P(48*x/((1-x)*(1-34*x+x^2))).list() %o A008845 A008845_list(20) # _G. C. Greubel_, Sep 13 2019 %o A008845 (GAP) a:=[0,48,1680];; for n in [4..20] do a[n]:=35*a[n-1]-35*a[n-2] +a[n-3]; od; a; # _G. C. Greubel_, Sep 13 2019 %K A008845 nonn,easy %O A008845 0,2 %A A008845 _N. J. A. Sloane_