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.

A103842 Triangle read by rows: row n is binary expansion of 2^n-n, n >= 1.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0
Offset: 1

Views

Author

Philippe Deléham, Mar 31 2005

Keywords

Comments

This sequence can also be obtained by reading (from bottom to top, column by column) the array given in A103582 after suppressing the terms below the main diagonal.

Examples

			Table begins:
1
1 0
1 0 1
1 1 0 0
1 1 0 1 1
1 1 1 0 1 0
1 1 1 1 0 0 1
		

Crossrefs

Programs

  • Maple
    p:=proc(n) local A,j,b: A:=convert(2^n-n,base,2): for j from 1 to nops(A) do b:=j->A[nops(A)+1-j] od: seq(b(j),j=1..nops(A)): end: for n from 1 to 15 do p(n) od; # yields sequence in triangular form # Emeric Deutsch, Apr 16 2005
  • Mathematica
    Table[IntegerDigits[2^n-n,2],{n,20}]//Flatten (* Harvey P. Dale, Feb 06 2022 *)
  • PARI
    tabl(nn) = for (n=1, nn, print(binary(2^n-n))); \\ Michel Marcus, Mar 01 2015

Extensions

More terms from Emeric Deutsch, Apr 16 2005