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.

A265912 Smallest m such that A014631(n) occurs in row m of Pascal's triangle.

Original entry on oeis.org

0, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 18 2015

Keywords

Comments

Each n occurs A126257(n) times consecutively.

Examples

			First occurrences of z(n)=A014631(n) in the left part of Pascal's triangle, repetitions marked:
.   0: z(1)                                       [1]
.   1: *z(1)                                      [1]
.   2: *z(1)  z(2)                                [1,2]
.   3: *z(1)  z(3)                                [1,3]
.   4: *z(1)  z(4)  z(5)                          [1,4,6]
.   5: *z(1)  z(6)  z(7)                          [1,5,10]
.   6: *z(1) *z(5)  z(8)  z(9)                    [1,6,15,20]
.   7: *z(1)  z(10) z(11) z(12)                   [1,7,21,35]
.   8: *z(1)  z(13) z(14) z(15) z(16)             [1,8,28,56,70]
.   9: *z(1)  z(17) z(18) z(19) z(20)             [1,9,36,84,126]
.  10: *z(1) *z(7)  z(21) z(22) z(23) z(24)       [1,10,45,120,210,252]
.  11: *z(1)  z(25) z(26) z(27) z(28) z(29)       [1,11,55,165,330,462]
.  12: *z(1)  z(30) z(31) z(32) z(33) z(34) z(35) [1,12,66,220,495,792,924]
---------------------------------------------------------------------------
.    n: 1  2  3  4  5  6   7   8   9  10  11  12  13  14  15  16  17  18
. z(n): 1  2  3  4  6  5  10  15  20   7  21  35   8  28  56  70   9  36
		

Crossrefs

Programs

  • Haskell
    import Data.List (findIndex); import Data.Maybe (fromJust)
    a265912 = fromJust . (flip findIndex a007318_tabl) . elem . a014631
    
  • Python
    from itertools import count, islice
    def A265912_gen(): # generator of terms
        s, c =(1,), set()
        for i in count(0):
            for d in s:
                if d not in c:
                    yield i
                    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 ())
    A265912_list = list(islice(A265912_gen(),30)) # Chai Wah Wu, Oct 17 2023