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.

A106344 Triangle read by rows: T(n,k) = binomial(k,n-k) mod 2.

Original entry on oeis.org

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

Views

Author

Paul Barry, Apr 29 2005

Keywords

Comments

A skew version of Sierpinski’s triangle A047999. - Johannes W. Meijer, Jun 05 2011
Row sums are A002487(n+1). Diagonal sums are A106345. Inverse is A106346.
Triangle formed by reading T triangle mod 2 with T := A026729, A062110, A084938, A099093, A106344, A109466, A110517, A112883, A130167. - Philippe Deléham, Dec 18 2008

Examples

			Triangle begins
  1;
  0, 1;
  0, 1, 1;
  0, 0, 0, 1;
  0, 0, 1, 1, 1;
  0, 0, 0, 1, 0, 1;
		

Crossrefs

Cf. A106345 (diagonal sums), A106346 (inverse).

Programs

  • GAP
    Flat(List([0..15], n-> List([0..n], k-> (Binomial(k,n-k) mod 2) ))); # G. C. Greubel, Feb 07 2020
  • Magma
    [ Binomial(k,n-k) mod 2: k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 07 2020
    
  • Maple
    seq(seq(`mod`(binomial(k, n-k), 2), k = 0..n), n = 0..15); # G. C. Greubel, Feb 07 2020
  • Mathematica
    Table[Mod[Binomial[k, n-k], 2], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Apr 18 2017 *)
  • PARI
    T(n,k) = binomial(k,n-k)%2;
    for(n=0,15, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 07 2020
    
  • Sage
    [[ mod(binomial(k,n-k), 2) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Feb 07 2020
    

A281185 a(0)=0, a(1)=1, a(2)=0; thereafter, a(2n) = a(n) + a(n+1) for n >= 2, a(2n+1) = a(n) for n >= 1.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 2, 1, 1, 1, 2, 0, 3, 2, 2, 1, 2, 1, 3, 1, 2, 2, 3, 0, 5, 3, 4, 2, 3, 2, 3, 1, 3, 2, 4, 1, 4, 3, 3, 1, 4, 2, 5, 2, 3, 3, 5, 0, 8, 5, 7, 3, 6, 4, 5, 2, 5, 3, 5, 2, 4, 3, 4, 1, 5, 3, 6, 2, 5, 4, 5, 1, 7, 4, 6, 3, 4, 3, 5, 1, 6, 4, 7, 2, 7, 5, 5, 2, 6, 3, 8, 3, 5, 5, 8, 0, 13, 8, 12, 5
Offset: 0

Views

Author

Melissa Dennison, Apr 12 2017

Keywords

Comments

A "bow" sequence. The bow sequences are a family of recursive sequences defined to have the flipped recursion from the Stern sequence A002487 (called bow for the opposite end of the boat from the stern). The bow sequences require two initial conditions: a(1)=alpha, a(2)=beta. We also define a(0)=0, although it does not enter into the recursion.
The bow sequences then follow the recursion a(2n) = a(n) + a(n+1) for n at least 2, and a(2n+1) = a(n). This particular bow sequence has initial conditions a(1)=0, a(2)=1 and (along with the sequence A106345 with initial conditions a(1)=1, a(2)=0) is of particular importance when studying the general bow sequences.

Examples

			a(3) = a(1) = 1, a(4) = a(2) + a(3) = 0 + 1 = 1, a(5) = a(2) = 0.
		

Crossrefs

Programs

  • Maple
    f:=proc(n) option remember;
    if n=0 then 0
    elif n=1 then 1
    elif n=2 then 0
    else
       if n mod 2 = 0 then f(n/2)+f(1+n/2) else f((n-1)/2) fi;
    fi;
    end;
    [seq(f(n),n=0..150)]; # N. J. A. Sloane, Apr 26 2017
  • Mathematica
    b[0]=0; b[1]=1; b[2]=0; b[n_?EvenQ]:=b[n]=b[n/2]+b[n/2+1]; b[n_?OddQ]:=b[n]=b[(n-1)/2]

Extensions

Edited by N. J. A. Sloane, Apr 26 2017
Showing 1-2 of 2 results.