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.

Showing 1-2 of 2 results.

A375999 Narayana numbers (A001263), sorted, duplicates removed.

Original entry on oeis.org

1, 3, 6, 10, 15, 20, 21, 28, 36, 45, 50, 55, 66, 78, 91, 105, 120, 136, 153, 171, 175, 190, 196, 210, 231, 253, 276, 300, 325, 336, 351, 378, 406, 435, 465, 490, 496, 528, 540, 561, 595, 630, 666, 703, 741, 780, 820, 825, 861, 903, 946, 990, 1035, 1081, 1128
Offset: 1

Views

Author

Pontus von Brömssen, Sep 06 2024

Keywords

Crossrefs

Programs

  • Python
    from bisect import insort
    from itertools import islice
    def A375999_generator():
        yield 1
        nkN_list = [(3, 2, 3)] # List of triples (n, k, A001263(n, k)), sorted by the last element.
        while 1:
            N0 = nkN_list[0][2]
            yield N0
            while 1:
                n, k, N = nkN_list[0]
                if N > N0: break
                del nkN_list[0]
                insort(nkN_list, (n+1, k, n*(n+1)*N//((n-k+1)*(n-k+2))), key=lambda x:x[2])
                if n == 2*k-1:
                    insort(nkN_list, (n+2, k+1, 4*n*(n+2)*N//(k+1)**2), key=lambda x:x[2])
    def A375999_list(nmax):
        return list(islice(A375999_generator(),nmax))

A376001 Numbers that can be written as a Narayana number (A001263) in at least 3 ways.

Original entry on oeis.org

1, 105, 1176, 4950, 5713890
Offset: 1

Views

Author

Pontus von Brömssen, Sep 06 2024

Keywords

Comments

The first 5 terms are triangular numbers.
a(2), ..., a(5) can all be written as a Narayana number in exactly 4 ways.
a(6) > 2*10^35 (if it exists).

Examples

			With T(n,k) = A001263(n,k):
      105 = T( 7,3) = T( 7, 5) = T(  15,2) = T(  15,  14);
     1176 = T( 9,4) = T( 9, 6) = T(  49,2) = T(  49,  48);
     4950 = T(11,4) = T(11, 8) = T( 100,2) = T( 100,  99);
  5713890 = T(92,3) = T(92,90) = T(3381,2) = T(3381,3380).
		

Crossrefs

Programs

  • Python
    from math import isqrt
    from bisect import insort
    from itertools import islice
    def A010054(n):
        return isqrt(m:=8*n+1)**2 == m
    def A376001_generator():
        yield 1
        nkN_list = [(5, 3, 20)] # List of triples (n, k, A001263(n, k)), sorted by the last element.
        while 1:
            N0 = nkN_list[0][2]
            c = 0
            while 1:
                n, k, N = nkN_list[0]
                if N > N0:
                    if c >= 3 or A010054(N0): yield N0
                    break
                central = n==2*k-1
                c += 2-central
                del nkN_list[0]
                insort(nkN_list, (n+1, k, n*(n+1)*N//((n-k+1)*(n-k+2))), key=lambda x:x[2])
                if central:
                    insort(nkN_list, (n+2, k+1, 4*n*(n+2)*N//(k+1)**2), key=lambda x:x[2])
    def A376001_list(nmax):
        return list(islice(A376001_generator(),nmax))
Showing 1-2 of 2 results.