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.

A133096 a(n) = A079848(n) - A062294(n).

This page as a plain text file.
%I A133096 #11 Sep 12 2023 02:04:36
%S A133096 0,0,0,4,12,20,18,50,34,66,80,70,120,76,90,198,140,70,110,156,100,164,
%T A133096 10,-6,198,66,258,280,732,390,594,342,270,314,210,402,252,246,-28,
%U A133096 -204,-224,234,14,528,500,850,1110,942,1014,1542,1906,1416,1034,1454,970,982,1518
%N A133096 a(n) = A079848(n) - A062294(n).
%C A133096 A079848 is the sequence of smallest primes such that the pairwise sums of not necessarily distinct elements are all distinct, whereas A062294 is the sequence of smallest primes such that the pairwise sums of distinct elements are all distinct.
%H A133096 Klaus Brockhaus, <a href="/A133096/b133096.txt">Table of n, a(n) for n = 1..3600</a>
%e A133096 a(6) = A079848(6) - A062294(6) = 37 - 17 = 20.
%o A133096 (Python)
%o A133096 from collections import deque
%o A133096 from itertools import islice
%o A133096 from sympy import nextprime
%o A133096 def A133096_gen(): # generator of terms
%o A133096     aset2, alist, bset2, blist, aqueue, bqueue, k = set(), [], set(), [], deque(), deque(), 1
%o A133096     while (k:=nextprime(k)):
%o A133096         cset2 = set()
%o A133096         for a in alist:
%o A133096             if (m:=k-a) in aset2:
%o A133096                 break
%o A133096             cset2.add(m)
%o A133096         else:
%o A133096             aqueue.append(k)
%o A133096             alist.append(k)
%o A133096             aset2.update(cset2)
%o A133096         cset2 = set()
%o A133096         for b in blist:
%o A133096             if (m:=b+k) in bset2:
%o A133096                 break
%o A133096             cset2.add(m)
%o A133096         else:
%o A133096             bqueue.append(k)
%o A133096             blist.append(k)
%o A133096             bset2.update(cset2)
%o A133096         if len(aqueue) > 0 and len(bqueue) > 0:
%o A133096             yield aqueue.popleft()-bqueue.popleft()
%o A133096 A133096_list = list(islice(A133096_gen(),30)) # _Chai Wah Wu_, Sep 11 2023
%Y A133096 Cf. A062294, A079848, A133097.
%K A133096 sign
%O A133096 1,4
%A A133096 _Klaus Brockhaus_, Sep 17 2007