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.

A066512 Least nonnegative integer not the sum or product of any previous pair. a(1)=0.

This page as a plain text file.
%I A066512 #9 Jun 09 2025 14:41:24
%S A066512 0,0,1,2,4,7,10,13,16,19,22,25,30,33,36,39,42,45,48,51,54,57,62,65,68,
%T A066512 71,74,77,80,83,86,89,94,97,103,106,109,115,118,121,126,129,135,138,
%U A066512 141,147,150,153,158,161,164,167,170,173,176,179,182,185,193,196,199
%N A066512 Least nonnegative integer not the sum or product of any previous pair. a(1)=0.
%H A066512 Michael S. Branicky, <a href="/A066512/b066512.txt">Table of n, a(n) for n = 1..10000</a>
%e A066512 a(13)=30, which is not a(i)+a(j) or a(i)*a(j) for any distinct i,j < 13.
%o A066512 (Python)
%o A066512 from itertools import count, islice
%o A066512 def agen(): # generator of terms
%o A066512     a, sums, products = [0], set(), set()
%o A066512     yield from a
%o A066512     for k in count(0):
%o A066512         if k not in sums and k not in products:
%o A066512             yield k
%o A066512             sums.update(k+a[i] for i in range(len(a)))
%o A066512             products.update(k*a[i] for i in range(len(a)))
%o A066512             a.append(k)
%o A066512         sums.discard(k)
%o A066512         products.discard(k)
%o A066512 print(list(islice(agen(), 61))) # _Michael S. Branicky_, Jun 09 2025
%Y A066512 Cf. A026416, A033627.
%K A066512 easy,nonn
%O A066512 1,4
%A A066512 _Brian Galebach_, Jan 04 2002