[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135233 Triangle A007318 * A193554, read by rows. 4
1, 2, 1, 5, 3, 1, 14, 7, 5, 1, 41, 15, 17, 7, 1, 122, 31, 49, 31, 9, 1, 365, 63, 129, 111, 49, 11, 1, 1094, 127, 321, 351, 209, 71, 13, 1, 3281, 255, 769, 1023, 769, 351, 97, 15, 1, 9842, 511, 1793, 2815, 2561, 1471, 545, 127, 17, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Row sums = 3^n.
Left column = A007051: (1, 2, 5, 14, 41, 122, ...).
LINKS
FORMULA
Binomial transform of A193554, as infinite lower triangular matrices.
T(n,k) = Sum_{j=0..n-k} (-1)^(n-k+j)*binomial(n,j)*2^j, with T(n,n) = 1, and T(n,0) = (3^n + 1)/2. - G. C. Greubel, Nov 20 2019
EXAMPLE
First few rows of the triangle:
1;
2, 1;
5, 3, 1;
14, 7, 5, 1;
41, 15, 17, 7, 1;
...
MAPLE
T:= proc(n, k) option remember;
if k=n then 1
elif k=0 then (3^n_1)/2
else add((-1)^(n-k+j)*binomial(n, j)*2^j, j=0..n-k)
fi; end:
seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Nov 20 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, (3^n+1)/2, Sum [(-1)^(n-k+i)* Binomial[n, i]*2^i, {i, 0, n-k}]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 20 2019 *)
PROG
(PARI) T(n, k) = if(k==n, 1, if(k==0, (3^n+1)/2, sum(j=0, n-k, (-1)^(n-k+j)*binomial(n, j)*2^j) )); \\ G. C. Greubel, Nov 20 2019
(Magma)
function T(n, k)
if k eq n then return 1;
elif k eq 0 then return (3^n+1)/2;
else return (&+[(-1)^(n-k+j)*2^j*Binomial(n, j): j in [0..n-k]]);
end if; return T; end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 20 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==n): return 1
elif (k==0): return (3^n+1)/2
else: return sum((-1)^(n-k+j)*2^j*binomial(n, j) for j in (0..n-k))
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 20 2019
CROSSREFS
Sequence in context: A162997 A112339 A132808 * A125170 A054445 A105848
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Nov 23 2007
EXTENSIONS
Definition corrected by N. J. A. Sloane, Jul 30 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 21:13 EDT 2024. Contains 375518 sequences. (Running on oeis4.)