OFFSET
1,2
COMMENTS
Equivalently, 1 together with numbers occurring in columns k >= 2 of Bernoulli's triangle.
LINKS
Pontus von Brömssen, Table of n, a(n) for n = 1..10000
PROG
(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])
CROSSREFS
KEYWORD
nonn
AUTHOR
Pontus von Brömssen, Aug 19 2024
STATUS
approved