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.

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

A199770 Self-convolution with "addition" played by bitwise XOR.

Original entry on oeis.org

1, 0, 2, 6, 18, 50, 146, 426, 1282, 3810, 11394, 34082, 102338, 306658, 919874, 2759154, 8276898, 24828386, 74484386, 223444258, 670326242, 2010964770, 6032902242, 18098635298, 54295809826, 162887261410, 488661978274, 1465985458850, 4397955924386
Offset: 1

Views

Author

Jacob A. Siehler, Nov 10 2011

Keywords

Crossrefs

Cf. A000108 (Catalan numbers).

Programs

  • Haskell
    import Data.Bits (xor)
    a199770 n = a199770_list !! (n-1)
    a199770_list = 1 : f [1] where
       f xs = y : f (y : xs) where
         y = sum $ zipWith xor xs $ reverse xs :: Integer
    -- Reinhard Zumkeller, Jul 15 2012
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          Bits[Xor](a(i), a(n-1-i)), i=0..n-1))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jun 16 2018
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Sum[BitXor[a[i], a[n - i]], {i, 1, n - 1}]; Table[a[n], {n, 30}]

Formula

a(1)=1, a(n) = sum ( a(i) XOR a(n-i), i = 1 .. n-1).

A318619 a(0) = 0, a(1) = 1; for n > 1, a(n) = Sum_{k=0..n-2} a(k) XOR a(n-k-2).

Original entry on oeis.org

0, 1, 0, 2, 0, 6, 6, 18, 26, 66, 110, 242, 450, 922, 1826, 3674, 7290, 14586, 29178, 58410, 116538, 233258, 466114, 932426, 1864586, 3729274, 7457386, 14915578, 29828762, 59659322, 119313866, 238631866, 477253498, 954516442, 1909012410, 3818036378, 7636034202
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 30 2018

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          add(Bits[Xor](a(k), a(n-k-2)), k=0..n-2))
        end:
    seq(a(n), n=0..40); # Alois P. Heinz, Aug 30 2018
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = Sum[BitXor[a[k], a[n - k - 2]], {k, 0, n - 2}]; Table[a[n], {n, 0, 36}]

Formula

a(n) ~ c * 2^n, where c = 0.111118791917413048987034558666...
Showing 1-3 of 3 results.