This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A006582 a(n) = Sum_{k=1..n-1} k XOR n-k. (Formerly M4053) 3
 0, 6, 4, 12, 20, 42, 32, 40, 48, 78, 84, 116, 148, 210, 176, 176, 176, 214, 212, 252, 292, 378, 368, 408, 448, 542, 580, 676, 772, 930, 832, 800, 768, 806, 772, 812, 852, 970, 928, 968, 1008, 1134, 1172, 1300, 1428, 1650, 1584, 1616, 1648, 1782, 1812, 1948 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 REFERENCES Marc LeBrun, personal communication. N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS R. J. Mathar, Table of n, a(n) for n = 2..1000 M. Le Brun, Email to N. J. A. Sloane, Jul 1991 FORMULA G.f.: 1/(1-x)^2 * Sum_{k>=0} 2^k * t^3(4t+6)/(1+t)^2, t=x^2^k. - Ralf Stephan, Feb 12 2003 a(0) = a(1) = 0, a(2n) = 2a(n) + 2a(n-1) + 4n - 4, a(2n+1) = 4a(n) + 6n. - Ralf Stephan, Oct 09 2003 MAPLE A006582 := proc(n)     add(A003987(k, n-k), k=1..n-1) ; end proc: # R. J. Mathar, Apr 17 2013 PROG (PARI) a(n)=if(n<2, 0, if(n%2==0, 2*a(n/2)+2*a(n/2-1)+4*(n/2-1), 4*a((n-1)/2)+6*((n-1)/2))) (PARI) a(n)=sum(k=1, n-1, bitxor(k, n-k)) \\ Charles R Greathouse IV, Aug 11 2017 CROSSREFS Antidiagonal sums of array A003987. Sequence in context: A141270 A040032 A239394 * A263586 A180497 A213038 Adjacent sequences:  A006579 A006580 A006581 * A006583 A006584 A006585 KEYWORD nonn AUTHOR STATUS approved

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

Last modified October 15 21:06 EDT 2018. Contains 316237 sequences. (Running on oeis4.)