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

 

Logo

Invitation: celebrating 50 years of OEIS, 250000 sequences, and Sloane's 75th, there will be a conference at DIMACS, Rutgers, Oct 9-10 2014.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007462 Shifts left under XOR-convolution with itself.
(Formerly M1274)
3
0, 1, 2, 4, 14, 38, 118, 338, 1006, 2990, 8974, 26862, 80510, 241390, 723934, 2171046, 6512910, 19536974, 58608782, 175821710, 527470318, 1582385678, 4747139342, 14241362318, 42724100334, 128172182990, 384516408110, 1153548740206, 3460645850030, 10381936700110 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

REFERENCES

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..600

M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210.

MAPLE

XOR:= proc(n, k) local m, l, i, r;

        m, l, r:= n, k, 0;

        for i from 0 while m>0 or l>0 do

          r:= r +`if`(irem(m, 2, 'm')=irem(l, 2, 'l'), 0, 2^i)

        od; r;

      end:

a:= proc(n) option remember;

      `if`(n<2, n, add(XOR(a(i), a(n-1-i)), i=0..n-1))

    end:

seq (a(n), n=0..30);  # Alois P. Heinz, Jun 22 2012

MATHEMATICA

a[0]=0; a[1]=1; a[n_] := a[n] = Sum[BitXor[a[k], a[n-k-1]], {k, 0, n-1}]; Table[a[n], {n, 0, 30}] (* Jean-Fran├žois Alcover, Sep 07 2012, after Alois P. Heinz *)

PROG

(Haskell)

import Data.Bits (xor)

a007462 n = a007462_list !! n

a007462_list = 0 : 1 : f [1, 0] where

   f xs = y : f (y : xs) where

     y = sum $ zipWith xor xs $ reverse xs :: Integer

-- Reinhard Zumkeller, Jul 15 2012

CROSSREFS

Cf. A192484, A199770.

Sequence in context: A135960 A216630 A006611 * A053623 A035010 A055540

Adjacent sequences:  A007459 A007460 A007461 * A007463 A007464 A007465

KEYWORD

nonn,nice,eigen

AUTHOR

N. J. A. Sloane.

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified July 28 06:29 EDT 2014. Contains 244987 sequences.