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 A342397 #20 Jul 08 2023 17:40:46 %S A342397 0,2,7,18,35,62,98,148,210,290,385,502,637,798,980,1192,1428,1698, %T A342397 1995,2330,2695,3102,3542,4028,4550,5122,5733,6398,7105,7870,8680, %U A342397 9552,10472,11458,12495,13602,14763,15998,17290,18660,20090,21602,23177,24838,26565,28382,30268,32248,34300,36450 %N A342397 Expansion of the o.g.f. (2*x^2 + 3*x + 2)*x/((x + 1)^2*(x - 1)^4). %C A342397 One-half of the antidiagonal sums of array A220508. %H A342397 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1). %F A342397 a(n) = (n+1)*(1 - (-1)^n)/16 + (7/4)*(binomial(n+3, 3) - binomial(n+2, 2)). %F A342397 a(n) = (A342362(n) - (n + 1))/4. %F A342397 a(2*n) = A169607(n) and a(2*n + 1) = 2*A004126(n + 1). %F A342397 a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 5. - _Chai Wah Wu_, Mar 11 2021 %t A342397 CoefficientList[Series[(2x^2+3x+2) x/((x+1)^2 (x-1)^4),{x,0,70}],x] (* or *) LinearRecurrence[{2,1,-4,1,2,-1},{0,2,7,18,35,62},70] (* _Harvey P. Dale_, Jul 08 2023 *) %o A342397 (PARI) /* First program */ %o A342397 seq1(n)={my(x='x+O('x^n)); Vec((2*x^2 + 3*x + 2)*x/((x + 1)^2*(x - 1)^4), -n)} %o A342397 /* Second program (array M is A220508) */ %o A342397 seq2(nn) = {my(M=matrix(nn+1, nn+1)); my(a=vector(nn+1)); for(n=1, nn+1, for(k=1, nn+1, M[n, k]=if(k == n, n^2-n, if(k < n, n^2-2*n+k, k^2-n)))); for(n=1, nn+1, a[n] = sum(k=1, n, M[n-k+1,k])/2); a} %Y A342397 Cf. A004126, A169607, A220508, A342462. %K A342397 nonn %O A342397 0,2 %A A342397 _Petros Hadjicostas_, Mar 10 2021