A093353 a(n) = (n + (n mod 2))*(n + 1)/2.
0, 2, 3, 8, 10, 18, 21, 32, 36, 50, 55, 72, 78, 98, 105, 128, 136, 162, 171, 200, 210, 242, 253, 288, 300, 338, 351, 392, 406, 450, 465, 512, 528, 578, 595, 648, 666, 722, 741, 800, 820, 882, 903, 968, 990, 1058, 1081, 1152, 1176, 1250, 1275, 1352, 1378, 1458
Offset: 0
Examples
a(1) = 2 since 2 = (1+1) and the sum of the first and second parts in the partition is 2; a(2) = 3 since 3 = (1+2) and the sum of these parts is 3; a(3) = 8 since 4 = (1+3) = (2+2) and the sum of all the parts is 8. - _Wesley Ivan Hurt_, Jan 26 2013
References
- W. R. Hare, S. T. Hedetniemi, R. Laskar, and J. Pfaff, Complete coloring parameters of graphs, Proceedings of the sixteenth Southeastern international conference on combinatorics, graph theory and computing (Boca Raton, Fla., 1985). Congr. Numer., Vol. 48 (1985), pp. 171-178. MR0830709 (87h:05088). See s_m on page 135. - N. J. A. Sloane, Apr 06 2012
Links
- G. C. Greubel, Table of n, a(n) for n = 0..5000
- Math StackExchange, Number of circles on vertices of a regular polygon, 2020.
- Eric Weisstein's World of Mathematics, Independence Number.
- Eric Weisstein's World of Mathematics, Torus Grid Graph.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Magma
[(n+1)*(2*n+1-(-1)^n)/4: n in [0..60]]; // Vincenzo Librandi, Jan 23 2020
-
Maple
a:= n-> (n+1)*floor((n+1)/2); seq(a(n), n = 0..70);
-
Mathematica
(* Contributions from Harvey P. Dale, Nov 15 2013: Start *) Table[(n+Mod[n,2])*(n+1)/2,{n,0,60}] LinearRecurrence[{1,2,-2,-1,1},{0,2,3,8,10},60] Join[{0},Module[{nn = 60, ab}, ab = Transpose[ Partition[ Accumulate[ Range[nn]], 2]]; Flatten[ Transpose[ {ab[[1]] + Range[nn/2], ab[[2]]}]]]] (* End *)
-
PARI
a(n)=(n+1)\2*(n+1) \\ Charles R Greathouse IV, Jun 11 2015
-
SageMath
[(n+1)*int((n+1)//2) for n in range(0,71)] # G. C. Greubel, Mar 14 2024
Formula
a(2*n) = a(2*n-1) + n = A014105(n).
a(2*n+1) = a(2*n) + 3*n + 2 = A001105(n+1).
G.f.: x*(2+x+x^2)/((1-x)^3*(1+x)^2).
a(n) = (n+1)*(2*n+1-(-1)^n)/4. - Paul Barry, Mar 31 2008
a(n) = (n+1)*floor((n+1)/2). - Wesley Ivan Hurt, Jan 26 2013
a(n) = Sum_{i=1..floor((n+1)/2)} i + Sum_{i=ceiling((n+1)/2)..n} i. - Wesley Ivan Hurt, Jun 08 2013
From Amiram Eldar, Mar 10 2022: (Start)
E.g.f.: (x*(3 + x)*cosh(x) + (1 + x)^2*sinh(x))/2. - Stefano Spezia, Nov 13 2024
Extensions
a(0)=0 prepended by Alois P. Heinz, Nov 13 2024
Comments