OFFSET
0,1
COMMENTS
This is the case k = 9 of 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 (similar sequences are listed in Crossrefs section). Note that:
2*( 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 ) - k = ( 2*n + (1-(-1)^k)/2 )^2. From this follows an alternative definition for the sequence: Numbers h such that 2*h - 9 is a square. Therefore, if a(n) is a square then its base is a term of A075841.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
O.g.f.: (5 - 6*x + 5*x^2)/(1 - x)^3.
E.g.f.: (5 + 4*x + 2*x^2)*exp(x).
a(n) = a(-1-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
n*a(n) - Sum_{j=0..n-1} a(j) = A002492(n) for n>0.
a(n) = Integral_{x=0..2n+4} |3-x| dx. - Pedro Caceres, Dec 29 2020
MAPLE
seq(2*n^2 + 2*n + 5, n=0..100); # Robert Israel, Nov 10 2017
MATHEMATICA
Table[2n^2+2n+5, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {5, 9, 17}, 50] (* Harvey P. Dale, Sep 18 2023 *)
PROG
(PARI) Vec((5 - 6*x + 5*x^2) / (1 - x)^3 + O(x^50)) \\ Colin Barker, Nov 13 2017
CROSSREFS
Second column of Mathar's array in A016813 (Comments section).
Subsequence of A001481, A001983, A004766, A020668, A046711 and A057653 (because a(n) = (n+2)^2 + (n-1)^2); A097268 (because it is also a(n) = (n^2+n+3)^2 - (n^2+n+2)^2); A047270; A243182 (for y=1).
Similar sequences (see the first comment): A161532 (k=-14), A181510 (k=-13), A152811 (k=-12), A222182 (k=-11), A271625 (k=-10), A139570 (k=-9), (-1)*A147973 (k=-8), A059993 (k=-7), A268581 (k=-6), A090288 (k=-5), A054000 (k=-4), A142463 or A132209 (k=-3), A056220 (k=-2), A046092 (k=-1), A001105 (k=0), A001844 (k=1), A058331 (k=2), A051890 (k=3), A271624 (k=4), A097080 (k=5), A093328 (k=6), A271649 (k=7), A255843 (k=8), this sequence (k=9).
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Nov 08 2017
STATUS
approved