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 A331952 #42 Sep 09 2023 10:05:41 %S A331952 -1,0,2,6,11,18,26,36,47,60,74,90,107,126,146,168,191,216,242,270,299, %T A331952 330,362,396,431,468,506,546,587,630,674,720,767,816,866,918,971,1026, %U A331952 1082,1140,1199,1260,1322,1386,1451,1518,1586,1656,1727,1800,1874,1950,2027 %N A331952 a(n) = (-7 + (-1)^(1+n) + 6*n^2) / 8. %C A331952 a(n+1) is once in the hexagonal spiral in A330707. a(n+2) is twice in the same spiral. %C A331952 a(n) has one odd followed by three evens. %C A331952 Difference table: %C A331952 -1, 0, 2, 6, 11, 18, 26, 36, ... = a(n) %C A331952 1, 2, 4, 5, 7, 8, 10, 11, ... = A001651(n+1) %C A331952 1, 2, 1, 2, 1, 2, 1, 2, ... = A000034. %H A331952 Colin Barker, <a href="/A331952/b331952.txt">Table of n, a(n) for n = 0..1000</a> %H A331952 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1). %H A331952 <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a> %F A331952 a(-n) = a(n). %F A331952 a(20+n) - a(n) = 30*(10+n). %F A331952 a(2+n) = a(n) + 3*(1+n), a(0)=-1 and a(1)=0. %F A331952 a(4*n) = 12*n^2 - 1, a(1+4*n) = 6*n*(1+2*n), a(2+4*n) = 2 + 12*n*(1+n), a(3+4*n) = 6*(1+n)*(1+2*n) for n>= 0. %F A331952 From _Colin Barker_, Feb 02 2020: (Start) %F A331952 G.f.: -(1 - 2*x - 2*x^2) / ((1 - x)^3*(1 + x)). %F A331952 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>3. %F A331952 a(n) = (-7 + (-1)^(1+n) + 6*n^2) / 8. %F A331952 (End) %F A331952 E.g.f.: (1/8)*(exp(x)*(6*x^2 + 6*x - 7) - exp(-x)). - _Stefano Spezia_, Feb 02 2020 after _Colin Barker_ %F A331952 a(n) = floor((n^2 - 1)*3/4). - _Michael Somos_, Sep 09 2023 %e A331952 G.f. = -1 + 2*x^2 + 6*x^3 + 11*x^4 + 18*x^5 + 26*x^6 + 36*x^7 + 47*x^8 + ... - _Michael Somos_, Sep 08 2023 %t A331952 LinearRecurrence[{2, 0, -2, 1}, {-1, 0, 2, 6}, 100] (* _Amiram Eldar_, Feb 02 2020 *) %t A331952 a[n_] := Floor[(n^2 - 1)*3/4]; (* _Michael Somos_, Sep 08 2023 *) %o A331952 (Magma) a:=[-1,0,2,6]; [n le 4 select a[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..45]]; // _Marius A. Burtea_, Feb 02 2020 %o A331952 (PARI) Vec(-(1 - 2*x - 2*x^2) / ((1 - x)^3*(1 + x)) + O(x^40)) \\ _Colin Barker_, Feb 03 2020 %o A331952 (PARI) {a(n) = (n^2 - 1)*3\4}; /* _Michael Somos_, Sep 08 2023 */ %Y A331952 Cf. A000034, A001651, A158463, 6*A014105, 2*A003154, A152746(n+1), A008585(1+n). %Y A331952 Equals 2 less than A084684, 1 less than A077043, and 1 more than A276382(n-1). - _Greg Dresden_, Feb 22 2020 %K A331952 sign,easy %O A331952 0,3 %A A331952 _Paul Curtz_, Feb 02 2020 %E A331952 a(42)-a(52) from _Stefano Spezia_, Feb 02 2020