Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Jan 05 2025 13:36:41
%S 1,2,0,2,2,1,3,2,3,4,2,6,5,2,10,6,2,15,7,2,21,8,2,28,9,2,36,10,2,45,
%T 11,2,55,12,2,66,13,2,78,14,2,91,15,2,105,16,2,120,17,2,136,18,2,153,
%U 19,2,171,20,2,190,21,2,210,22,2,231,23,2,253,24,2,276,25,2,300,26,2
%N Interleaving of (1,2,3,4,5,...), (2,2,2,2,...) and (0,1,3,6,10,...).
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,3,0,0,-3,0,0,1).
%F G.f.: -(2*x^7+x^5-4*x^4-x^3+2*x+1) / ((x-1)^3*(x^2+x+1)^3). - _Colin Barker_, Jul 31 2013
%p a := proc(n) if n mod 3 = 0 then RETURN(n/3+1) fi: if n mod 3 = 1 then RETURN(2) fi: if n mod 3 = 2 then RETURN(((n-2)/3)*((n-2)/3+1)/2) fi: end: for n from 0 to 150 do printf(`%d,`,a(n)) od:
%t Flatten[ Table[ {n, 2, n(n - 1)/2}, {n, 1, 27}]]
%t With[{nn=30},Riffle[Riffle[Range[nn],Accumulate[Range[0,nn]],{2,-1,2}],2,{2,-1,3}]] (* _Harvey P. Dale_, May 20 2013 *)
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_, Jun 18 2003
%E More terms from _James A. Sellers_ and _Robert G. Wilson v_, Jun 21 2003