login
Generalized Gould sequence.
1

%I #15 Jun 06 2021 09:05:14

%S 1,2,3,4,4,4,6,8,6,4,6,8,8,8,12,16,10,4,6,8,8,8,12,16,12,8,12,16,16,

%T 16,24,32,18,4,6,8,8,8,12,16,12,8,12,16,16,16,24,32,20,8,12,16,16,16,

%U 24,32,24,16,24,32,32,32,48,64,34,4,6,8,8,8,12,16,12,8,12,16,16,16,24,32,20,8

%N Generalized Gould sequence.

%C Row sums of A114213.

%H Jeffrey Shallit and Lukas Spiegelhofer, <a href="https://arxiv.org/abs/1710.06203">Continuants, run lengths, and Barry's modified Pascal triangle</a>, arXiv:1710.06203 [math.CO], 2017.

%F a(n) = Sum_{k=0..n} (Sum_{j=0..n-k} C(k, j)*C(n-k, j)*((1 + (-1)^k)/2) mod 2).

%F a(n) = A001316(n) + A001316((n-2)/2)*(1 + (-1)^n)/2.

%e From _Omar E. Pol_, Jun 09 2009: (Start)

%e Triangle begins:

%e 1;

%e 2,3;

%e 4,4,4,6;

%e 8,6,4,6,8,8,8,12;

%e 16,10,4,6,8,8,8,12,16,12,8,12,16,16,16,24;

%e 32,18,4,6,8,8,8,12,16,12,8,12,16,16,16,24,32,20,8,12,16,16,16,24,32,24,...

%e Also, we can write the initial term followed by a triangle:

%e 1;

%e 2;

%e 3,4;

%e 4,4,6,8;

%e 6,4,6,8,8,8,12,16;

%e 10,4,6,8,8,8,12,16,12,8,12,16,16,16,24,32;

%e 18,4,6,8,8,8,12,16,12,8,12,16,16,16,24,32,20,8,12,16,16,16,24,32,24,16,...

%e Also, we can write first two terms followed by a triangle:

%e 1;

%e 2;

%e 3;

%e 4,4;

%e 4,6,8,6;

%e 4,6,8,8,8,12,16,10;

%e 4,6,8,8,8,12,16,12,8,12,16,16,16,24,32,18;

%e 4,6,8,8,8,12,16,12,8,12,16,16,16,24,32,20,8,12,16,16,16,24,32,24,16,24,32,...

%e (End)

%o (PARI) T(n,k) = sum(j=0, n-k, binomial(k, j)*binomial(n-k, j)*(1+(-1)^j)/2) % 2; \\ A114213

%o a(n) = sum(k=0, n-1, T(n,k)); \\ _Michel Marcus_, Jun 06 2021

%Y Cf. A000079. [_Omar E. Pol_, Jun 09 2009]

%K easy,nonn

%O 0,2

%A _Paul Barry_, Nov 17 2005