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-2 of 2 results.

A256756 a(n) = bitwise XOR of n and the reverse of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 25, 18, 39, 60, 45, 86, 67, 72, 22, 25, 0, 55, 50, 45, 36, 83, 78, 65, 29, 18, 55, 0, 9, 22, 27, 108, 117, 122, 44, 39, 50, 9, 0, 27, 110, 101, 100, 111, 55, 60, 45, 22, 27, 0, 121, 114, 111, 100, 58, 45, 36, 27, 110, 121
Offset: 0

Views

Author

Alois P. Heinz, Apr 09 2015

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> Bits[Xor](n, (s-> parse(cat(s[-i]$i=1..length(s))))(""||n)):
    seq(a(n), n=0..80);
  • Mathematica
    Table[BitXor[n,FromDigits[Reverse[IntegerDigits[n]]]],{n,0,65}] (* Ivan N. Ianakiev, Apr 10 2015 *)
  • PARI
    a(n) = bitxor(n, subst(Polrev(digits(n)), x, 10)); \\ Michel Marcus, Apr 10 2015

Formula

a(n) = A003987(n, A004086(n)).

A256755 a(n) = bitwise OR of n and the reverse of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 29, 31, 47, 63, 61, 87, 83, 91, 22, 29, 22, 55, 58, 61, 62, 91, 94, 93, 31, 31, 55, 33, 43, 55, 63, 109, 119, 127, 44, 47, 58, 43, 44, 63, 110, 111, 116, 127, 55, 63, 61, 55, 63, 55, 121, 123, 127, 127, 62, 61, 62, 63, 110
Offset: 0

Views

Author

Alois P. Heinz, Apr 09 2015

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> Bits[Or](n, (s-> parse(cat(s[-i]$i=1..length(s))))(""||n)):
    seq(a(n), n=0..80);
  • Mathematica
    Table[BitOr[n,FromDigits[Reverse[IntegerDigits[n]]]],{n,0,64}] (* Ivan N. Ianakiev, Apr 10 2015 *)
  • PARI
    a(n) = bitor(n, subst(Polrev(digits(n)), x, 10)); \\ Michel Marcus, Apr 10 2015

Formula

a(n) = A003986(n,A004086(n)).
Showing 1-2 of 2 results.