cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A052509 Knights-move Pascal triangle: T(n,k), n >= 0, 0 <= k <= n; T(n,0) = T(n,n) = 1, T(n,k) = T(n-1,k) + T(n-2,k-1) for k = 1,2,...,n-1, n >= 2.

This page as a plain text file.
%I A052509 #85 Jul 02 2025 16:01:58
%S A052509 1,1,1,1,2,1,1,3,2,1,1,4,4,2,1,1,5,7,4,2,1,1,6,11,8,4,2,1,1,7,16,15,8,
%T A052509 4,2,1,1,8,22,26,16,8,4,2,1,1,9,29,42,31,16,8,4,2,1,1,10,37,64,57,32,
%U A052509 16,8,4,2,1,1,11,46,93,99,63,32,16,8,4,2,1
%N A052509 Knights-move Pascal triangle: T(n,k), n >= 0, 0 <= k <= n; T(n,0) = T(n,n) = 1, T(n,k) = T(n-1,k) + T(n-2,k-1) for k = 1,2,...,n-1, n >= 2.
%C A052509 Also square array T(n,k) (n >= 0, k >= 0) read by antidiagonals: T(n,k) = Sum_{i=0..k} binomial(n,i).
%C A052509 As a number triangle read by rows, this is T(n,k) = Sum_{i=n-2*k..n-k} binomial(n-k,i), with T(n,k) = T(n-1,k) + T(n-2,k-1). Row sums are A000071(n+2). Diagonal sums are A023435(n+1). It is the reverse of the Whitney triangle A004070. - _Paul Barry_, Sep 04 2005
%C A052509 Also, twice number of orthants intersected by a generic k-dimensional subspace of R^n [Naiman and Scheinerman, 2017]. - _N. J. A. Sloane_, Mar 03 2018
%H A052509 Reinhard Zumkeller, <a href="/A052509/b052509.txt">Rows n = 0..150 of triangle, flattened</a>
%H A052509 Clark Kimberling, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/40-4/kimberling.pdf">Path-counting and Fibonacci numbers</a>, Fib. Quart. 40 (4) (2002) 328-338, Example 1C.
%H A052509 Daniel Q. Naiman and Edward R. Scheinerman, <a href="https://arxiv.org/abs/1709.07446">Arbitrage and Geometry</a>, arXiv:1709.07446 [q-fin.MF], 2017 [Contains the square array multiplied by 2].
%H A052509 Richard L. Ollerton and Anthony G. Shannon, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/36-2/ollerton.pdf">Some properties of generalized Pascal squares and triangles</a>, Fib. Q., 36 (1998), 98-109. See Tables 5 and 14.
%H A052509 D. J. Price, <a href="http://www.jstor.org/stable/3609091">Some unusual series occurring in n-dimensional geometry</a>, Math. Gaz., 30 (1946), 149-150.
%H A052509 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F A052509 T(n, k) = Sum_{m=0..n} binomial(n-k, k-m). - _Wouter Meeussen_, Oct 03 2002
%F A052509 From _Werner Schulte_, Feb 15 2018: (Start)
%F A052509 Referring to the square array T(i,j):
%F A052509 G.f. of row n: Sum_{k>=0} T(n,k) * x^k = (1+x)^n / (1-x).
%F A052509 G.f. of T(i,j): Sum_{k>=0, n>=0} T(n,k) * x^k * y^n = 1 / ((1-x)*(1-y-x*y)).
%F A052509 Let a_i(n) be multiplicative with a_i(p^e) = T(i, e), p prime and e >= 0, then Sum_{n>0} a_i(n)/n^s = (zeta(s))^(i+1) / (zeta(2*s))^i for i >= 0.
%F A052509 (End)
%F A052509 T(n, k) = hypergeom([-k, -n + k], [-k], -1). - _Peter Luschny_, Nov 28 2021
%F A052509 From _Jianing Song_, May 30 2022: (Start)
%F A052509 Referring to the triangle, G.f.: Sum_{n>=0, 0<=k<=n} T(n,k) * x^n * y^k = 1 / ((1-x*y)*(1-x-x^2*y)).
%F A052509 T(n,k) = 2^(n-k) for ceiling(n/2) <= k <= n. (End)
%e A052509 Triangle begins:
%e A052509 [0] 1;
%e A052509 [1] 1, 1;
%e A052509 [2] 1, 2,  1;
%e A052509 [3] 1, 3,  2,  1;
%e A052509 [4] 1, 4,  4,  2,  1;
%e A052509 [5] 1, 5,  7,  4,  2,  1;
%e A052509 [6] 1, 6, 11,  8,  4,  2, 1;
%e A052509 [7] 1, 7, 16, 15,  8,  4, 2, 1;
%e A052509 [8] 1, 8, 22, 26, 16,  8, 4, 2, 1;
%e A052509 [9] 1, 9, 29, 42, 31, 16, 8, 4, 2, 1;
%e A052509 As a square array, this begins:
%e A052509   1  1  1  1  1  1 ...
%e A052509   1  2  2  2  2  2 ...
%e A052509   1  3  4  4  4  4 ...
%e A052509   1  4  7  8  8  8 ...
%e A052509   1  5 11 15 16 ...
%e A052509   1  6 16 26 31 32 ...
%p A052509 a := proc(n::nonnegint, k::nonnegint) option remember: if k=0 then RETURN(1) fi: if k=n then RETURN(1) fi: a(n-1,k)+a(n-2,k-1) end: for n from 0 to 11 do for k from 0 to n do printf(`%d,`,a(n,k)) od: od: # _James Sellers_, Mar 17 2000
%p A052509 with(combinat): for s from 0 to 11 do for n from s to 0 by -1 do if n=0 or s-n=0 then printf(`%d,`,1) else printf(`%d,`,sum(binomial(n, i), i=0..s-n)) fi; od: od: # _James Sellers_, Mar 17 2000
%t A052509 Table[Sum[Binomial[n-k, k-m], {m, 0, n}], {n, 0, 10}, {k, 0, n}]
%t A052509 T[n_, k_] := Hypergeometric2F1[-k, -n + k, -k, -1];
%t A052509 Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Peter Luschny_, Nov 28 2021 *)
%o A052509 (PARI) T(n,k)=sum(m=0,n,binomial(n-k,k-m));
%o A052509 for(n=0,10,for(k=0,n,print1(T(n,k),", "););print();); /* show triangle */
%o A052509 (Haskell)
%o A052509 a052509 n k = a052509_tabl !! n !! k
%o A052509 a052509_row n = a052509_tabl !! n
%o A052509 a052509_tabl = [1] : [1,1] : f [1] [1,1] where
%o A052509    f row' row = rs : f row rs where
%o A052509      rs = zipWith (+) ([0] ++ row' ++ [1]) (row ++ [0])
%o A052509 -- _Reinhard Zumkeller_, Nov 22 2012
%o A052509 (GAP) A052509:=Flat(List([0..100],n->List([0..n],k->Sum([0..n],m->Binomial(n-k,k-m))))); # _Muniru A Asiru_, Sat Feb 17 2018
%o A052509 (Magma) [[(&+[Binomial(n-k, k-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // _G. C. Greubel_, May 13 2019
%o A052509 (Sage) [[sum(binomial(n-k, k-j) for j in (0..n)) for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, May 13 2019
%Y A052509 Cf. A054123, A054124, A007318, A008949.
%Y A052509 Row sums A000071; Diagonal sums A023435; Mirror A004070.
%Y A052509 Columns give A000027, A000124, A000125, A000127, A006261, ...
%Y A052509 Cf. A052509, A054123, A054124, A007318, A008949, A052553.
%Y A052509 Partial sums across rows of (extended) Pascal's triangle A052553.
%K A052509 nonn,tabl,easy,nice
%O A052509 0,5
%A A052509 _N. J. A. Sloane_, Mar 17 2000
%E A052509 More terms from _James Sellers_, Mar 17 2000
%E A052509 Entry formed by merging two earlier entries. - _N. J. A. Sloane_, Jun 17 2007
%E A052509 Edited by _Johannes W. Meijer_, Jul 24 2011