A014631 Numbers in order in which they appear in Pascal's triangle.
1, 2, 3, 4, 6, 5, 10, 15, 20, 7, 21, 35, 8, 28, 56, 70, 9, 36, 84, 126, 45, 120, 210, 252, 11, 55, 165, 330, 462, 12, 66, 220, 495, 792, 924, 13, 78, 286, 715, 1287, 1716, 14, 91, 364, 1001, 2002, 3003, 3432, 105, 455, 1365, 5005, 6435, 16, 560, 1820, 4368, 8008, 11440
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, Finding structure in sequences of real numbers via graph theory: a problem list, arXiv:2012.04625 [math.CO], 2020-2021.
- F. Richman, Combinations and Permutations
- Index entries for triangles and arrays related to Pascal's triangle
- Index entries for sequences that are permutations of the natural numbers
Programs
-
Haskell
import Data.List (nub) a014631 n = a014631_list !! (n-1) a014631_list = 1 : (nub $ concatMap tail a034868_tabf) -- Reinhard Zumkeller, Dec 19 2015
-
Mathematica
lst = {1}; t = Flatten[Table[Binomial[n, m], {n, 16}, {m, Floor[n/2]}]]; Do[ If[ !MemberQ[lst, t[[n]]], AppendTo[lst, t[[n]] ]], {n, Length@t}]; lst (* Robert G. Wilson v *) DeleteDuplicates[Flatten[Table[Binomial[n,m],{n,20},{m,0,Floor[n/2]}]]] (* Harvey P. Dale, Apr 08 2013 *)
-
Python
from itertools import count, islice def A014631_gen(): # generator of terms s, c =(1,), set() for i in count(0): for d in s: if d not in c: yield d c.add(d) s=(1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1)) + ((s[-1]<<1,) if i&1 else ()) A014631_list = list(islice(A014631_gen(),30)) # Chai Wah Wu, Oct 17 2023
Extensions
More terms from Erich Friedman
Offset changed by Reinhard Zumkeller, Dec 18 2015
Comments