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.

A014631 Numbers in order in which they appear in Pascal's triangle.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A permutation of the natural numbers. - Robert G. Wilson v, Jun 12 2014
In Pascal's triangle a(n) occurs the first time in row A265912(n). - Reinhard Zumkeller, Dec 18 2015

Crossrefs

Cf. A034868, A119629 (inverse), A265912.

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