login
Odd elements in the 5-Pascal triangle A028313.
7

%I #19 Jan 12 2024 08:41:28

%S 1,1,1,1,5,1,1,1,1,7,7,1,1,19,19,1,1,9,27,27,9,1,1,65,65,1,1,11,101,

%T 101,11,1,1,57,147,231,231,147,57,1,1,13,69,69,13,1,1,273,273,1,1,15,

%U 355,855,855,355,15,1,1,111,451,2277,2277,451,111,1,1,17,127,1661,3487,5379,5379,3487,1661,127,17,1

%N Odd elements in the 5-Pascal triangle A028313.

%H G. C. Greubel, <a href="/A028315/b028315.txt">Table of n, a(n) for n = 0..1000</a>

%e Odd elements of A028313 as an irregular triangle:

%e 1;

%e 1, 1;

%e 1, 5, 1;

%e 1, 1;

%e 1, 7, 7, 1;

%e 1, 19, 19, 1;

%e 1, 9, 27, 27, 9, 1;

%e 1, 65, 65, 1;

%e 1, 11, 101, 101, 11, 1;

%e 1, 57, 147, 231, 231, 147, 57, 1;

%e 1, 13, 69, 69, 13, 1;

%e 1, 273, 273, 1;

%e 1, 15, 355, 855, 855, 355, 15, 1;

%e ...

%t A028313[n_, k_]:= If[n<2, 1, Binomial[n,k] +3*Binomial[n-2,k-1]];

%t f= Table[A028313[n, k], {n,0,100}, {k,0,n}]//Flatten;

%t a[n_]:= DeleteCases[{f[[n+1]]}, _?EvenQ];

%t Table[a[n], {n,0,150}]//Flatten (* _G. C. Greubel_, Jan 06 2024 *)

%o (Magma)

%o A028313:= func< n, k | n le 1 select 1 else Binomial(n, k) +3*Binomial(n-2, k-1) >;

%o a:=[A028313(n, k): k in [0..n], n in [0..100]];

%o [a[n]: n in [1..150] | (a[n] mod 2) eq 1]; // _G. C. Greubel_, Jan 06 2024

%o (SageMath)

%o def A028313(n, k): return 1 if n<2 else binomial(n, k) + 3*binomial(n-2, k-1)

%o a=flatten([[A028313(n, k) for k in range(n+1)] for n in range(101)])

%o [a[n] for n in (0..150) if a[n]%2==1] # _G. C. Greubel_, Jan 06 2024

%Y Cf. A028313, A028316, A028325.

%K nonn,tabf

%O 0,5

%A _Mohammad K. Azarian_

%E More terms from _James A. Sellers_