A184676 a(n) = n + floor((n/2-1/(4*n))^2); complement of A183867.
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
Offset: 1
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..5000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
Programs
-
Magma
[n+Floor((n/2-1/(4*n))^2): n in [1..60]]; // Vincenzo Librandi, Dec 09 2015
-
Maple
seq(n+floor((n/2-1/(4*n))^2), n=1..56); # Nathaniel Johnston, Jun 26 2011
-
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[n + Floor[(n/2 - 1/(4 n))^2], {n, 60}] (* Vincenzo Librandi, Dec 09 2015 *) Table[Ceiling[n/2] (2 + Ceiling[n/2] - Mod[n, 2]) - 1, {n, 1, 56}] (* Fred Daniel Kline, Jun 24 2016 *)
-
PARI
a(n) = n+floor((n/2-1/(4*n))^2); \\ Michel Marcus, Dec 09 2015
Formula
a(n) = n+floor((n/2-1/(4*n))^2).
a(n) = A198442(n+2)-1. - Fred Daniel Kline, Jun 24 2016
G.f.: x*(1 + x^2 - x^3)/((1 - x)^3*(1 + x)). - Ilya Gutkovskiy, Jun 24 2016
Comments