cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A007461 Shifts left under AND-convolution with itself.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 0, 5, 2, 4, 0, 10, 0, 12, 4, 13, 6, 12, 0, 18, 12, 20, 20, 36, 20, 36, 16, 44, 32, 60, 40, 73, 50, 56, 40, 58, 44, 52, 60, 84, 36, 112, 88, 108, 136, 132, 152, 178, 136, 232, 108, 260, 244, 256, 304, 288
Offset: 0

Views

Author

Keywords

Comments

a(A000225(n)) mod 2 = 1, a(A062289(n)) mod 2 = 0. [Reinhard Zumkeller, Apr 02 2012]

References

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

Crossrefs

Programs

  • Haskell
    import Data.Bits ((.&.))
    a007461 n = a007461_list !! n
    a007461_list = 1 : f [1,1] where
       f xs = x : f (x:xs) where
         x = sum $ zipWith (.&.) xs $ tail $ reverse xs :: Integer
    -- Reinhard Zumkeller, Apr 02 2012
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          Bits[And](a(i), a(n-1-i)), i=0..n-1))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Jun 16 2018
  • Mathematica
    a[0]=1; a[1]=1; a[n_] := a[n] = Sum[BitAnd[a[k], a[n-k-1]], {k, 0, n-1}]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 07 2012 *)

A007462 Shifts left under XOR-convolution with itself.

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

Programs

  • 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
  • Maple
    with(Bits):
    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 *)

Formula

a(n) ~ c * 3^n, where c = 0.151273188266276362886260408769663538575624024971525940842364624... . - Vaclav Kotesovec, Sep 10 2014

A192484 Shifts left under XOR-convolution: a(n) = Sum_{k=0..n-1} a(k) XOR a(n-k-1) for n>1 with a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 6, 14, 38, 102, 294, 854, 2566, 7622, 22790, 68166, 204678, 613318, 1839750, 5518310, 16553798, 49656774, 148968774, 446888518, 1340652486, 4021929542, 12065804486, 36197270598, 108591619654, 325774522822, 977323956550
Offset: 0

Views

Author

Paul D. Hanna, Jul 02 2011

Keywords

Comments

Limit a(n+1)/a(n) = 3.

Examples

			Given a(0)=1, a(1)=2, illustrate XOR convolution for the initial terms.
a(2) = 1 XOR 2 + 2 XOR 1 = 3 + 3 = 6;
a(3) = 1 XOR 6 + 2 XOR 2 + 6 XOR 1 = 7 + 0 + 7 = 14;
a(4) = 1 XOR 14 + 2 XOR 6 + 6 XOR 2 + 14 XOR 1 = 15 + 4 + 4 + 15 = 38; ...
		

Crossrefs

Cf. variant: A007462.
Cf. A199770.

Programs

  • Haskell
    import Data.Bits (xor)
    a192484 n = a192484_list !! n
    a192484_list = 1 : 2 : f [2,1] where
       f xs = y : f (y : xs) where
         y = sum $ zipWith xor xs $ reverse xs :: Integer
    -- Reinhard Zumkeller, Jul 15 2012
  • PARI
    {a(n)=if(n<2,n+1,sum(k=0,n-1,bitxor(a(k),a(n-k-1))))}
    
Showing 1-3 of 3 results.