OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 2*A051472(n). - G. C. Greubel, Jan 06 2024
EXAMPLE
Even elements of A028313 as an irregular triangle:
6, 6;
12;
8, 8;
38;
10, 36, 36, 10;
46, 130, 46;
12, 12;
...
MATHEMATICA
A028313[n_, k_]:= If[n<2, 1, Binomial[n, k] +3*Binomial[n-2, k-1]];
f= Table[A028313[n, k], {n, 0, 100}, {k, 0, n}]//Flatten;
b[n_]:= DeleteCases[{f[[n+1]]}, _?OddQ];
Table[b[n], {n, 0, 200}]//Flatten (* G. C. Greubel, Jan 06 2024 *)
PROG
(Magma)
A028313:= func< n, k | n le 1 select 1 else Binomial(n, k) +3*Binomial(n-2, k-1) >;
a:=[A028313(n, k): k in [0..n], n in [0..100]];
[a[n]: n in [1..200] | (a[n] mod 2) eq 0]; // G. C. Greubel, Jan 06 2024
(SageMath)
def A028313(n, k): return 1 if n<2 else binomial(n, k) + 3*binomial(n-2, k-1)
a=flatten([[A028313(n, k) for k in range(n+1)] for n in range(101)])
[a[n] for n in (0..200) if a[n]%2==0] # G. C. Greubel, Jan 06 2024
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
EXTENSIONS
More terms from James A. Sellers
STATUS
approved