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.

A375572 Numbers occurring at least twice in Bernoulli's triangle A008949.

Original entry on oeis.org

1, 4, 7, 8, 11, 15, 16, 22, 26, 29, 31, 32, 37, 42, 46, 56, 57, 63, 64, 67, 79, 92, 93, 99, 106, 120, 121, 127, 128, 130, 137, 154, 163, 172, 176, 191, 211, 219, 232, 247, 254, 255, 256, 277, 299, 301, 326, 352, 378, 379, 382, 386, 407, 436, 466, 470, 497, 502
Offset: 1

Views

Author

Pontus von Brömssen, Aug 19 2024

Keywords

Comments

Equivalently, 1 together with numbers occurring in columns k >= 2 of Bernoulli's triangle.

Crossrefs

Programs

  • PARI
    isok(k) = my(nb=0); for (i=0, k, nb += #select(x->(x==k), vector(i+1, j, sum(jj=0, j-1, binomial(i, jj))))); nb >= 2; \\ Michel Marcus, Aug 22 2024
    
  • PARI
    lista(nn) = my(v = vector(nn)); for (n=1, nn, my(w=vector(n+1, j, sum(jj=0, j-1, binomial(n, jj)))); for (i=1, #w, if (w[i] <= nn, v[w[i]]++));); Vec(select(x->(x>=2), v, 1)); \\ Michel Marcus, Aug 23 2024
    
  • Python
    from math import comb
    from bisect import insort
    def A375572_list(nmax):
        a_list = [1]
        if nmax == 1: return a_list
        nkb_list = [(2,2,4)] # List of triples (n,k,A008949(n,k)), sorted by the last element.
        while 1:
            b0 = nkb_list[0][2]
            a_list.append(b0)
            if len(a_list) == nmax: return a_list
            while 1:
                n,k,b = nkb_list[0]
                if b > b0: break
                del nkb_list[0]
                insort(nkb_list,(n+1,k,2*b-comb(n,k)),key=lambda x:x[2])
                if n == k:
                    insort(nkb_list,(n+1,k+1,2**(k+1)),key=lambda x:x[2])