login
A143334
Only odd and even version of Pascal's triangle sequence: t(n,m)=If[m*(n - m) == 0, 1, Mod[Binomial[n, m], 2]*Prime[n] + (1 - Mod[Binomial[n, m], 2])*(Prime[n] + 1)].
0
1, 1, 1, 1, 4, 1, 1, 5, 5, 1, 1, 8, 8, 8, 1, 1, 11, 12, 12, 11, 1, 1, 14, 13, 14, 13, 14, 1, 1, 17, 17, 17, 17, 17, 17, 1, 1, 20, 20, 20, 20, 20, 20, 20, 1, 1, 23, 24, 24, 24, 24, 24, 24, 23, 1, 1, 30, 29, 30, 30, 30, 30, 30, 29, 30, 1
OFFSET
1,5
COMMENTS
Row sums are:{1, 2, 6, 12, 26, 48, 70, 104, 142, 192, 270}.
FORMULA
t(n,m)=If[m*(n - m) == 0, 1, Mod[Binomial[n, m], 2]*Prime[n] + (1 - Mod[Binomial[n, m], 2])*(Prime[n] + 1)].
EXAMPLE
{1},
{1, 1},
{1, 4, 1},
{1, 5, 5, 1},
{1, 8, 8, 8, 1},
{1, 11, 12, 12, 11, 1},
{1, 14, 13, 14, 13, 14, 1},
{1, 17, 17, 17, 17, 17, 17, 1},
{1, 20, 20, 20, 20, 20, 20, 20, 1},
{1, 23, 24, 24, 24, 24, 24, 24, 23, 1},
{1, 30, 29, 30, 30, 30, 30, 30, 29, 30, 1}
MATHEMATICA
t[n_, m_] = If[m*(n - m) == 0, 1, Mod[Binomial[n, m], 2]*Prime[n] + (1 - Mod[Binomial[n, m], 2])*(Prime[n] + 1)]; Table[Table[t[n, m], {m, 0, n}], {n, 0, 10}]; Flatten[%]
CROSSREFS
Sequence in context: A147566 A204621 A146770 * A156050 A136489 A166455
KEYWORD
nonn,uned
AUTHOR
STATUS
approved