[go: up one dir, main page]

login
A014848
a(n) = n^2 - floor( n/2 ).
9
0, 1, 3, 8, 14, 23, 33, 46, 60, 77, 95, 116, 138, 163, 189, 218, 248, 281, 315, 352, 390, 431, 473, 518, 564, 613, 663, 716, 770, 827, 885, 946, 1008, 1073, 1139, 1208, 1278, 1351, 1425, 1502, 1580, 1661, 1743, 1828, 1914, 2003, 2093, 2186, 2280, 2377, 2475
OFFSET
0,3
COMMENTS
Quasipolynomial of order 2. - Charles R Greathouse IV, Jan 19 2012
The binomial transform is 0, 1, 5, 20,... which is A084850 with offset 1. - R. J. Mathar, Nov 26 2014
FORMULA
a(2*n) = A033991(n).
a(2*n+1) = A033951(n).
G.f.: x*(1+x+2*x^2)/((1-x)^2*(1-x^2)).
a(n) = (2*n*(2*n-1) + 1 - (-1)^n)/4. - Bruno Berselli, Feb 17 2011
a(n) = round(n/(exp(1/n) - 1)), n > 0. - Richard R. Forberg, Nov 14 2014
E.g.f.: (1/4)*((1 + 2*x + 4*x^2)*exp(x) - exp(-x)). - G. C. Greubel, Mar 14 2024
MAPLE
A014848:=n->n^2 - floor(n/2); seq(A014848(n), n=0..50); # Wesley Ivan Hurt, Oct 11 2013
MATHEMATICA
Table[n^2-Floor[n/2], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Apr 12 2011 *)
LinearRecurrence[{2, 0, -2, 1}, {0, 1, 3, 8}, 60] (* Harvey P. Dale, Jun 13 2022 *)
PROG
(PARI) a(n)=n^2-n\2
(Magma) [n^2-Floor(n/2) : n in [0..50]]; // Wesley Ivan Hurt, Nov 14 2014
(Python)
def A014848(n): return n**2-(n>>1) # Chai Wah Wu, Jan 18 2023
(SageMath) [n^2 - (n//2) for n in range(71)] # G. C. Greubel, Mar 14 2024
CROSSREFS
Cf. A033951, A033991, A042963 (first differences), A084850.
Sequence in context: A366087 A022947 A098762 * A140479 A264689 A146158
KEYWORD
nonn,easy
STATUS
approved