|
|
A184676
|
|
a(n) = n + floor((n/2-1/(4*n))^2); complement of A183867.
|
|
3
|
|
|
1, 2, 5, 7, 11, 14, 19, 23, 29, 34, 41, 47, 55, 62, 71, 79, 89, 98, 109, 119, 131, 142, 155, 167, 181, 194, 209, 223, 239, 254, 271, 287, 305, 322, 341, 359, 379, 398, 419, 439, 461, 482, 505, 527, 551, 574, 599, 623, 649, 674, 701, 727, 755, 782, 811, 839
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is also the number of trees with n vertices with diameter (n-3). - Erich Friedman, Apr 06 2017
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n+floor((n/2-1/(4*n))^2).
G.f.: x*(1 + x^2 - x^3)/((1 - x)^3*(1 + x)). - Ilya Gutkovskiy, Jun 24 2016
|
|
MAPLE
|
|
|
MATHEMATICA
|
a[n_]:=n+Floor[(n/2-1/(4n))^2];
b[n_]:=n+Floor[n^(1/2)+(n+1/2)^(1/2)];
Table[a[n], {n, 1, 120}] (* A184676 *)
Table[b[n], {n, 1, 120}] (* A183867 *)
FindLinearRecurrence[Table[a[n], {n, 1, 120}]]
LinearRecurrence[{2, 0, -2, 1}, {1, 2, 5, 7}, 56] (* Ray Chandler, Aug 02 2015 *)
Table[Ceiling[n/2] (2 + Ceiling[n/2] - Mod[n, 2]) - 1, {n, 1, 55}]. (* Fred Daniel Kline, Jun 24 2016 *)
|
|
PROG
|
(PARI) a(n) = n+floor((n/2-1/(4*n))^2); \\ Michel Marcus, Dec 09 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|