Pensieve header: January 18: Solving the MAT 475 Quiz 1 on the computer.

bp[n_,0] = bp[n_,n_]=1;
bp[n_,k_] := bp[n,k] = bp[n-1,k-1]+bp[n-1,k] /. 2->0

Sum[bp[1000,k], {k,0,1000}]

(∑_(k=0)^1000)bp[1000,k]

tab=Table[bp[n,k], {n,0,10}, {k,0,n}]

tab // MatrixForm

?ArrayPlot

ArrayPlot[Table[bp[n,k], {n,0,1000}, {k,0,n}]]

S[0]=1; S[n_] := S[n]=2S[n-(2^(⌊Log[2,n]⌋))];

S[1000]

S[(10^6)]

?S

{1,2,4,5,8}

"12458"

sl[1]={"","1"};
sl[n_] :=sl[n]=Join[
sl[n-1],
(#<>ToString[n])& /@ Reverse[sl[n-1]]
]

sl[2] /. "" -> "∅"

sl[3] /. "" -> "∅"

sl[5] /. "" -> "∅"

sl[10] /. "" -> "∅"

??Times

2{1,2,3}

??StringJoin

SetAttributes[StringJoin,Listable]

Unprotect[Plus];
a_+b_ := a*b;
Protect[Plus]

4+5

Unprotect[Plus]

Clear[Plus]

2+3