A010000 a(0) = 1, a(n) = n^2 + 2 for n > 0.
1, 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403
Offset: 0
Examples
G.f. = 1 + 3*x + 6*x^2 + 11*x^3 + 18*x^4 + 27*x^5 + 38*x^6 + 51*x^7 + 66*x^8 + ...
Links
- Bruno Berselli, Table of n, a(n) for n = 0..1000
- Bob Andriesse, Graphical representation of the first 21 segments of the spiral with grid.
- Allan Bickle, Wiener indices of maximal k-degenerate graphs, International Journal of Mathematical Combinatorics 2 (2021) 68-79.
- Allan Bickle and Zhongyuan Che, Wiener indices of maximal k-degenerate graphs, arXiv:1908.09202 [math.CO], 2019.
- Allan Bickle, A Survey of Maximal k-degenerate Graphs and k-Trees, Theory and Applications of Graphs 0 1 (2024) Article 5.
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Crossrefs
Programs
-
Mathematica
a[1] = a[2] = 1; a[n_] := a[n] = 2 + a[n - a[n - 1]]; b = Table[0, {100}]; Do[c = (a[n] + 1)/2; If[c < 101 && b[[c]] == 0, b[[c]] = n], {n, 1, 10^4}]; b Join[{1}, Range[50]^2 + 2] (* Bruno Berselli, Feb 08 2012 *) a[ n_] := n^2 + 2 - Boole[n == 0]; (* Michael Somos, May 05 2015 *)
-
Maxima
a(n):=if n=0 then 1 else 2*n*sum((-1)^(n-j)*binomial(n,j)*(j+1/n)^(n+1),j,0,n)/(n+1)!; /* Vladimir Kruchinin, Jun 03 2013 */
-
PARI
{a(n) = n^2 + 2 - (n==0)}; /* Michael Somos, Aug 11 2009 */
Formula
Euler transform of length 6 sequence [ 3, 0, 1, 0, 0, -1]. - Michael Somos, Aug 11 2009
From Michael Somos, Aug 11 2009: (Start)
G.f.: (1 + x^3) / (1 - x)^3.
a(n) = a(-n) for all n in Z. (End)
E.g.f.: (x*(x+1) + 2)*e^x - 1. - Gopinath A. R., Feb 14 2012
a(n) = (2*n/(n+1)!)*Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*(j+1/n)^(n+1), n > 0, a(0)=1. - Vladimir Kruchinin, Jun 03 2013
Sum_{n>=0} 1/a(n) = 3/4+1/4*sqrt(2)*Pi*coth(Pi*sqrt 2)= 1.8610281... - R. J. Mathar, May 07 2024
Comments