Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 May 07 2016 00:46:01
%S 0,1,6,3,10,15,28,21,36,45,66,55,78,91,120,105,136,153,190,171,210,
%T 231,276,253,300,325,378,351,406,435,496,465,528,561,630,595,666,703,
%U 780,741,820,861,946,903,990,1035,1128,1081,1176,1225,1326,1275,1378,1431,1540,1485,1596,1653,1770
%N Expansion of x*(1 + 5*x - 3*x^2 + 7*x^3 + 3*x^4 + 3 *x^5 - x^6 + x^7)/((1 - x)^3*(1 + x + x^2 + x^3)^2).
%C Permutation of triangular numbers.
%C Consecutive alternating even and odd triangular numbers.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TriangularNumber.html">Triangular Number</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,2,-2,0,0,-1,1)
%F O.g.f.: x*(1 + 5*x - 3*x^2 + 7*x^3 + 3*x^4 + 3 *x^5 - x^6 + x^7)/((1 - x)^3*(1 + x + x^2 + x^3)^2).
%F E.g.f.: (1/2)*((x^2 + x + 1)*cosh(x) + x*sin(x) + (x - 1)*cos(x) + x*(x + 3)*sinh(x)).
%F a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9).
%F a(n) = (1/8)*(2*n + sin((Pi*n)/2) - cos((Pi*n)/2) + (-1)^n) *(2*n + sin((Pi*n)/2) - cos((Pi*n)/2) + (-1)^n + 2).
%F a(n) = A000217(A116966(n-1)), n>0.
%F a(n) mod 2 = A000035(n)
%F Sum_{n>=1} 1/a(n) = 2.
%e a(0) = 0;
%e a(1) = 1;
%e a(2) = 1 + 2 + 3 = 6;
%e a(3) = 1 + 2 = 3;
%e a(4) = 1 + 2 + 3 + 4 = 10;
%e a(5) = 1 + 2 + 3 + 4 + 5 = 15;
%e a(6) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28;
%e a(7) = 1 + 2 + 3 + 4 + 5 + 6 = 21;
%e a(8) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36, etc.
%e Illustration of initial terms:
%e -------------------------------------------------------------------
%e o
%e o o o
%e o o o o o o
%e o o o o o o o o o o
%e o o o o o o o o o o o o o o o
%e o o o o o o o o o o o o o o o o o o o o o
%e o o o o o o o o o o o o o o o o o o o o o o o o o o o o
%e --------------------------------------------------------------------
%e --------------------------------------------------------------------
%e n=1 n=2 n=3 n=4 n=5 n=6 n=7
%t LinearRecurrence[{1, 0, 0, 2, -2, 0, 0, -1, 1}, {0, 1, 6, 3, 10, 15, 28, 21, 36}, 59]
%t Table[(1/8) (2 n + Sin[(Pi n)/2] - Cos[(Pi n)/2] + (-1)^n) (2 n + Sin[(Pi n)/2] - Cos[(Pi n)/2] + (-1)^n + 2), {n, 0, 58}]
%t Table[(1/8) (2 n - (-1)^(n - 1) + I^((n - 2) (n - 1))) (2 n - (-1)^(n - 1) + I^((n - 2) (n - 1)) + 2), {n, 0, 58}]
%Y Cf. A000035, A000217, A116966.
%K nonn,easy
%O 0,3
%A _Ilya Gutkovskiy_, May 02 2016