login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226940 a(0)=0; if a(n-1) is odd, a(n) = n + a(n-1), otherwise a(n) = n - a(n-1). 0

%I

%S 0,1,3,6,-2,7,13,20,-12,21,31,42,-30,43,57,72,-56,73,91,110,-90,111,

%T 133,156,-132,157,183,210,-182,211,241,272,-240,273,307,342,-306,343,

%U 381,420,-380,421,463,506,-462,507,553,600,-552,601,651,702,-650,703,757

%N a(0)=0; if a(n-1) is odd, a(n) = n + a(n-1), otherwise a(n) = n - a(n-1).

%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,3,0,0,0,-3,0,0,0,1).

%F G.f.: x*(1 +3*x +6*x^2 -2*x^3 +4*x^4 +4*x^5 +2*x^6 -6*x^7 +3*x^8 +x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3). [_Bruno Berselli_, Jul 01 2013]

%F a(n) = 3*a(n-4) -3*a(n-8) +a(n-12). [_Bruno Berselli_, Jul 01 2013]

%F a(4n) = -A002939(n), a(4n+1) = A054569(n+1), a(4n+2) = A054554(n+2), a(4n+3) = A068377(n+2). [_Bruno Berselli_, Jul 02 2013]

%t LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42}, 60] (* _Bruno Berselli_, Jul 01 2013 *)

%o (MAGMA) [IsZero(n) select 0 else IsOdd(Self(n)) select n+Self(n) else n-Self(n): n in [0..60]]; // _Bruno Berselli_, Jul 01 2013

%o (Maxima) makelist(coeff(taylor(x*(1+3*x+6*x^2-2*x^3+4*x^4+4*x^5+2*x^6-6*x^7+3*x^8+x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3), x, 0, n), x, n), n, 0, 60); /* _Bruno Berselli_, Jul 01 2013 */

%Y Cf. A081348 (second bisection); A002939, A054554, A054569, A068377.

%K sign,easy

%O 0,3

%A _Enrico Santilli_, Jun 23 2013

%E More terms from _Bruno Berselli_, Jul 01 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 16:34 EDT 2019. Contains 325185 sequences. (Running on oeis4.)