login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A158565
A modulo two based Pascal's triangle using powers of two for even and powers of three for odd: t(n,m)=If[Mod[Binomial[n, m], 2] == 0 && m <= Floor[n/2], 2^m, If[Mod[Binomial[n, m], 2] == 0 && m > Floor[n/2], 2^(n - m), If[Mod[Binomial[n, m], 2] == 1 && m <= Floor[n/2], 3^m, If[Mod[Binomial[n, m], 2] == 1 && m > Floor[n/2], 3^(n - m), 0]]]].
0
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 2, 4, 2, 1, 1, 3, 4, 4, 3, 1, 1, 2, 9, 8, 9, 2, 1, 1, 3, 9, 27, 27, 9, 3, 1, 1, 2, 4, 8, 16, 8, 4, 2, 1, 1, 3, 4, 8, 16, 16, 8, 4, 3, 1, 1, 2, 9, 8, 16, 32, 16, 8, 9, 2, 1
OFFSET
0,5
COMMENTS
Row sums are:
{1, 2, 4, 8, 10, 16, 32, 80, 46, 64, 104,...}.
FORMULA
t(n,m)=If[Mod[Binomial[n, m], 2] == 0 && m <= Floor[n/2], 2^m,
If[Mod[Binomial[n, m], 2] == 0 && m > Floor[n/2], 2^(n - m),
If[Mod[Binomial[n, m], 2] == 1 && m <= Floor[n/2], 3^m,
If[Mod[Binomial[n, m], 2] == 1 && m > Floor[n/2], 3^(n - m), 0]]]].
EXAMPLE
{1},
{1, 1},
{1, 2, 1},
{1, 3, 3, 1},
{1, 2, 4, 2, 1},
{1, 3, 4, 4, 3, 1},
{1, 2, 9, 8, 9, 2, 1},
{1, 3, 9, 27, 27, 9, 3, 1},
{1, 2, 4, 8, 16, 8, 4, 2, 1},
{1, 3, 4, 8, 16, 16, 8, 4, 3, 1},
{1, 2, 9, 8, 16, 32, 16, 8, 9, 2, 1}
MATHEMATICA
Table[Table[If[Mod[Binomial[n, m], 2] == 0 && m <= Floor[n/2], 2^m,
If[Mod[Binomial[n, m], 2] == 0 && m > Floor[n/2], 2^(n - m),
If[Mod[Binomial[n, m], 2] == 1 && m <= Floor[n/2], 3^m,
If[Mod[Binomial[n, m], 2] == 1 && m > Floor[n/2], 3^(n - m),
0]]]], {m, 0, n}], {n, 0, 10}];
Flatten[%]
CROSSREFS
Sequence in context: A093557 A098802 A048804 * A132422 A065133 A343033
KEYWORD
nonn,tabl,uned
AUTHOR
Roger L. Bagula, Mar 21 2009
STATUS
approved