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.

A246831 a(n) is the concatenation of n and 3n in binary.

Original entry on oeis.org

0, 7, 22, 57, 76, 95, 210, 245, 280, 315, 350, 737, 804, 871, 938, 1005, 1072, 1139, 1206, 1273, 1340, 1407, 2882, 3013, 3144, 3275, 3406, 3537, 3668, 3799, 3930, 4061, 4192, 4323, 4454, 4585, 4716, 4847, 4978, 5109, 5240, 5371, 5502, 11137, 11396, 11655
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2014

Keywords

Examples

			a(0) = (0|0)_2 = 0.
a(1) = (1|11)_2 = 7.
a(2) = (10|110)_2 = 22.
a(3) = (11|1001)_2 = 57.
a(4) = (100|1100)_2 = 76.
a(5) = (101|1111)_2 = 95.
		

Crossrefs

Cf. A246830. Column k=3 of A246834.

Programs

  • Maple
    f:= proc(i, j) local r, h, k; r:=0; h:=0; k:=j;
          while k>0 do r:=r+2^h*irem(k, 2, 'k'); h:=h+1 od; k:=i;
          while k>0 do r:=r+2^h*irem(k, 2, 'k'); h:=h+1 od; r
        end:
    a:= n-> f(n, 3*n):
    seq(a(n), n=0..60);
  • Python
    def A246831(n):
        return int(bin(n)[2:]+bin(3*n)[2:],2) # Chai Wah Wu, Sep 05 2014

Formula

a(n) = A246830(2n,n).