[go: up one dir, main page]

login
Revision History for A007318 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Pascal's triangle read by rows: C(n,k) = binomial(n,k) = n!/(k!*(n-k)!), 0 <= k <= n.
(history; published version)
#1019 by N. J. A. Sloane at Mon Nov 11 22:26:57 EST 2024
STATUS

proposed

approved

#1018 by Chai Wah Wu at Mon Nov 11 13:42:22 EST 2024
STATUS

editing

proposed

#1017 by Chai Wah Wu at Mon Nov 11 13:41:29 EST 2024
PROG

(Python)

from math import comb, isqrt

def A007318(n): return comb(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)), n-comb(r+1, 2)) # Chai Wah Wu, Nov 11 2024

STATUS

approved

editing

#1016 by R. J. Mathar at Sat Aug 03 12:37:56 EDT 2024
STATUS

proposed

approved

#1015 by R. J. Mathar at Sat Aug 03 12:27:07 EDT 2024
STATUS

editing

proposed

#1014 by R. J. Mathar at Sat Aug 03 12:26:50 EDT 2024
LINKS

J. H. Conway and N. J. A. Sloane, <a href="http://citeseerx.ist.psu.edu/viewdocpdf/summary?doi=10.1.1.39.9899f097dc2b7ab879b1f15f52f188faa5243271f982">Low-dimensional lattices. VII Coordination sequences</a>, Proc. R. Soc. Lond. A, Vo. 453, No. 1966 (1997), pp. 2369-2389.

D. Merlini, R. Sprugnoli and M. C. Verri, <a href="https://doi.org/10.1007/978-3-0348-8405-1_11">An algebra for proper generating trees</a>, in: D. Gardy and A. Mokkadem (eds.), Mathematics and Computer Science, Trends in Mathematics, Birkhäuser, Basel, 2000, pp. 127-139; <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.22.3810&amp;rep=rep1&amp;type=pdf/d44077e8b0d03e6a3402e8dfb57b59e6f264064e">alternative link</a>.

STATUS

approved

editing

#1013 by N. J. A. Sloane at Fri Jun 07 14:10:36 EDT 2024
MATHEMATICA

Flatten@Table[CoefficientList[(1+x)^n, x], {n, 0, 11}] (* Oliver Seipel, Jun 04 2024 *)

a[n_, 0] := 1; a[n_, n_] := 1;

a[n_, k_] := a[n, k] = a[n-1, k-1] + a[n-1, k];

Flatten@Table[a[n, k], {n, 0, 11}, {k, 0, n}] (* Oliver Seipel, Jun 04 2024 *)

a[n_, 0] := 1; a[n_, n_] := 1;

a[n_, k_] := a[n, k] = a[n-1, k] (n+k)/(n-k) - a[n-1, k-1];

Flatten@Table[

a[n, k], {n, 0, 11}, {k, 0, n}] (* Oliver Seipel, Jun 04 2024, after Peter Bala *)

KEYWORD

nonn,tabl,nice,easy,core,look,hear,changed

STATUS

proposed

approved

#1012 by Oliver Seipel at Tue Jun 04 12:55:09 EDT 2024
STATUS

editing

proposed

Discussion
Tue Jun 04
13:13
Stefano Spezia: Uhm… I am not convinced that we need these new codes here
Fri Jun 07
14:10
N. J. A. Sloane: I agree with S.S.  These programs are not needed here.
#1011 by Oliver Seipel at Tue Jun 04 12:53:30 EDT 2024
MATHEMATICA

a[n, k], {n, 0, 11}, {k, 0, n}] (* Oliver Seipel, Jun 04 2024 , after Peter Bala *)

#1010 by Oliver Seipel at Tue Jun 04 12:49:50 EDT 2024
MATHEMATICA

Flatten@Table[CoefficientList[(1+x)^n, x], {n, 0, 11}] (* Oliver Seipel, Jun 04 2024 *)

a[n_, 0] := 1; a[n_, n_] := 1;

a[n_, k_] := a[n, k] = a[n-1, k-1] + a[n-1, k];

Flatten@Table[a[n, k], {n, 0, 11}, {k, 0, n}] (* Oliver Seipel, Jun 04 2024 *)

a[n_, 0] := 1; a[n_, n_] := 1;

a[n_, k_] := a[n, k] = a[n-1, k] (n+k)/(n-k) - a[n-1, k-1];

Flatten@Table[

a[n, k], {n, 0, 11}, {k, 0, n}] (* Oliver Seipel, Jun 04 2024 after Peter Bala*)

STATUS

approved

editing