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.

This page as a plain text file.
%I A375572 #17 Aug 25 2024 18:42:58
%S A375572 1,4,7,8,11,15,16,22,26,29,31,32,37,42,46,56,57,63,64,67,79,92,93,99,
%T A375572 106,120,121,127,128,130,137,154,163,172,176,191,211,219,232,247,254,
%U A375572 255,256,277,299,301,326,352,378,379,382,386,407,436,466,470,497,502
%N A375572 Numbers occurring at least twice in Bernoulli's triangle A008949.
%C A375572 Equivalently, 1 together with numbers occurring in columns k >= 2 of Bernoulli's triangle.
%H A375572 Pontus von Brömssen, <a href="/A375572/b375572.txt">Table of n, a(n) for n = 1..10000</a>
%o A375572 (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
%o A375572 (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
%o A375572 (Python)
%o A375572 from math import comb
%o A375572 from bisect import insort
%o A375572 def A375572_list(nmax):
%o A375572     a_list = [1]
%o A375572     if nmax == 1: return a_list
%o A375572     nkb_list = [(2,2,4)] # List of triples (n,k,A008949(n,k)), sorted by the last element.
%o A375572     while 1:
%o A375572         b0 = nkb_list[0][2]
%o A375572         a_list.append(b0)
%o A375572         if len(a_list) == nmax: return a_list
%o A375572         while 1:
%o A375572             n,k,b = nkb_list[0]
%o A375572             if b > b0: break
%o A375572             del nkb_list[0]
%o A375572             insort(nkb_list,(n+1,k,2*b-comb(n,k)),key=lambda x:x[2])
%o A375572             if n == k:
%o A375572                 insort(nkb_list,(n+1,k+1,2**(k+1)),key=lambda x:x[2])
%Y A375572 Cf. A006987, A008949, A375570, A375573.
%K A375572 nonn
%O A375572 1,2
%A A375572 _Pontus von Brömssen_, Aug 19 2024