login
A183861
a(1) = 1; for n > 1, a(n) = n - 1 + ceiling((n^2 - 1)/3); complement of A183860.
1
1, 2, 5, 8, 12, 17, 22, 28, 35, 42, 50, 59, 68, 78, 89, 100, 112, 125, 138, 152, 167, 182, 198, 215, 232, 250, 269, 288, 308, 329, 350, 372, 395, 418, 442, 467, 492, 518, 545, 572, 600, 629, 658, 688, 719, 750, 782, 815, 848, 882, 917, 952, 988, 1025, 1062, 1100, 1139, 1178, 1218, 1259, 1300, 1342, 1385, 1428, 1472, 1517, 1562, 1608, 1655, 1702
OFFSET
1,2
FORMULA
a(n) = n - 1 + ceiling((n^2 - 1)/3).
a(n) = floor((2*n^2 + 6*n - 5)/6) for n > 1. - Sela Fried, Jul 12 2022
G.f.: x*(1 + 2*x^2 - x^3 + x^4 - x^5)/((1 - x)^3*(1 + x + x^2)). - Stefano Spezia, Jul 12 2022
MATHEMATICA
a=3; b=1;
Table[n+Floor[(a*n+b)^(1/2)], {n, 90}]
Table[n-1+Ceiling[(n*n-b)/a], {n, 70}]
LinearRecurrence[{2, -1, 1, -2, 1}, {1, 2, 5, 8, 12, 17}, 70] (* Harvey P. Dale, Jul 01 2015 *)
PROG
(PARI) a(n) = if (n==1, 1, n - 1 + ceil((n^2 - 1)/3)); \\ Michel Marcus, Jul 13 2022
(PARI) a(n)=if(n==1, 1, n^2\3+n-1) \\ Charles R Greathouse IV, Jul 13 2022
CROSSREFS
Cf. A183860.
Sequence in context: A241566 A002960 A022942 * A024534 A011974 A372231
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 07 2011
EXTENSIONS
Name corrected by Michel Marcus, Jul 13 2022
STATUS
approved