The OEIS is supported by the many generous donors to the OEIS Foundation.

 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 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A199403 Binary XOR of (2^k - (-1)^k)/3 as k varies from 1 to n. 3
 1, 0, 3, 6, 13, 24, 51, 102, 205, 408, 819, 1638, 3277, 6552, 13107, 26214, 52429, 104856, 209715, 419430, 838861, 1677720, 3355443, 6710886, 13421773, 26843544, 53687091, 107374182, 214748365, 429496728, 858993459, 1717986918, 3435973837, 6871947672, 13743895347 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Colin Barker, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (2,0,0,1,-2). FORMULA G.f.: (3*x^2-2*x+1)*x/(2*x^5-x^4-2*x+1). - Alois P. Heinz, Nov 05 2011 From Vladimir Reshetnikov, Nov 02 2015: (Start) a(n) = (6*cos(Pi*n/2) + 2*sin(Pi*n/2) + 4*2^n - 5*(-1)^n - 5)/10. Recurrence: a(1) = 1, a(2) = 0, a(3) = 3, a(4) = 6, a(5) = 13, a(n) = 2*a(n-1) + a(n-4) - 2*a(n-5). E.g.f.: (2*cosh(2*x) - 5*cosh(x) + 2*sinh(2*x) + 3*cos(x) + sin(x))/5. (End) EXAMPLE a(2) = (2^1+1)/3 XOR (2^2-1)/3 = 1 XOR 1 = 0; a(3) = (2^1+1)/3 XOR (2^2-1)/3 XOR (2^3+1)/3 = 1 XOR 1 XOR 3 = 3; a(4) = (2^1+1)/3 XOR (2^2-1)/3 XOR (2^3+1)/3 XOR (2^4-1)/3 = 1 XOR 1 XOR 3 XOR 5 = 6. MAPLE a:= n-> (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>, <0|0|0|0|1>, <-2|1|0|0|2>>^n. <<0, 1, 0, 3, 6>>)[1, 1]: seq(a(n), n=1..60); # Alois P. Heinz, Nov 05 2011 MATHEMATICA FoldList[BitXor, Table[(2^n - (-1)^n)/3, {n, 1, 20}]] (* Vladimir Reshetnikov, Nov 02 2015 *) Table[(6*Cos[Pi n/2] + 2*Sin[Pi n/2] + 4*2^n - 5*(-1)^n - 5)/10, {n, 1, 20}] (* Vladimir Reshetnikov, Nov 02 2015 *) PROG (PARI) {a(n)=if(n<0, 0, bitxor(a(n-1), ((2^n-(-1)^n)/3)))} (PARI) Vec(x*(3*x^2-2*x+1)/((x-1)*(x+1)*(2*x-1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Nov 02 2015 CROSSREFS Cf. A199402, A199396. Sequence in context: A350851 A320286 A032287 * A006017 A147323 A047183 Adjacent sequences: A199400 A199401 A199402 * A199404 A199405 A199406 KEYWORD nonn,easy AUTHOR Paul D. Hanna, Nov 05 2011 STATUS approved

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

Last modified December 10 04:38 EST 2023. Contains 367699 sequences. (Running on oeis4.)