OFFSET
1,2
COMMENTS
Old name was: The lone multiple of n among the next n numbers.
Another old name: a(n) = n*floor((n+1)/2).
Consider the triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26 27 28
... Then sequence contains the multiple of n in the n-th row.
Termwise products of the natural numbers and the natural numbers repeated.
Number of pairs (x,y) having the same parity, with x in {0,...,n} and y in {0,...,2n}. - Clark Kimberling, Jul 02 2012
Similar to generalized hexagonal numbers A000217. Other members of this family are A210977, A006578, A210978, A181995, A210981, A210982. - Omar E. Pol, Aug 09 2012
For even n, a(n) gives the sum of all the parts in the partitions of n into exactly two parts. For odd n>1, a(n) gives n plus the sum of all the parts in the partitions of n into exactly two parts. - Wesley Ivan Hurt, Nov 14 2013
Number of regions of the plane that do not contain the origin, in the arrangement of lines with polar equations rho = 1/cos(theta-k*2*Pi/n), k=0..n-1; or, by inversion, number of bounded regions in the arrangement of circles with radius 1 and centers the n-th roots of unity. - Luc Rousseau, Feb 08 2019
Numbers k such that floor(sqrt(2k)+1/2) | k. - Wesley Ivan Hurt, Dec 01 2020
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Torleiv Kløve, Linear recurring sequences in boolean rings, Math. Scand., 33 (1973), 5-12.
Torleiv Kløve, Linear recurring sequences in boolean rings, Math. Scand., 33 (1973), 5-12. (Annotated scanned copy)
Luc Rousseau, Illustration, a(n) viewed as a number of regions in an arrangement of lines / of circles.
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) = n*floor((n+1)/2).
a(n) = n*A008619(n).
a(2*n-1) = n*(2*n-1), a(2*n) = 2*n^2.
From Paul Barry, Jun 29 2006: (Start)
G.f.: x*(1+x+2*x^2)/((1+x)^2*(1-x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = n*((2*n+1) - (-1)^n)/4. (End)
a(n) = n * ceiling(n/2). - Wesley Ivan Hurt, Nov 14 2013
E.g.f.: (1/2)*x*( (x+2)*cosh(x) + (x+1)*sinh(x) ). - G. C. Greubel, Mar 14 2024
Sum_{n>=1} 1/a(n) = Pi^2/12 + 2*log(2). - Amiram Eldar, Mar 15 2024
MAPLE
MATHEMATICA
a[n_Integer] := n*Floor[(n + 1)/2] (* Olivier Gérard, Jun 21 2007 *)
Table[n*Ceiling[n/2], {n, 60}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {1, 2, 6, 8, 15}, 60] (* Harvey P. Dale, May 08 2014 *)
PROG
(Python)
for n in range(1, 55):
print(n*((n+1)//2), end=", ") # Alex Ratushnyak, Apr 26 2012
(PARI) a(n)=(n+1)\2*n \\ Charles R Greathouse IV, Jun 11 2015
(Magma) [n*(n+(n mod 2))/2: n in [1..70]]; // G. C. Greubel, Mar 14 2024
(SageMath) [n*(n +(n%2))/2 for n in range(1, 71)] # G. C. Greubel, Mar 14 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Mar 29 2004
EXTENSIONS
Corrected and extended by Joshua Zucker, May 08 2006
New name from Alex Ratushnyak, Apr 26 2012
New name from Wesley Ivan Hurt, Nov 14 2013
STATUS
approved