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.

A133744 a(n) = A062295(n) - A133743(n).

This page as a plain text file.
%I A133744 #11 Sep 11 2023 17:50:19
%S A133744 0,0,0,0,0,0,15,-19,-44,0,31,33,80,43,92,0,112,305,140,-77,336,261,0,
%T A133744 -103,-228,129,131,268,429,292,-153,-805,-352,189,985,2040,1260,440,
%U A133744 -693,-468,239,-2367,-1365,-285,885,596,3531,2608,3360,2752,-2196,0,2709,4367,4411,2105
%N A133744 a(n) = A062295(n) - A133743(n).
%C A133744 A062295 is the sequence of smallest squares such that the pairwise sums of not necessarily distinct elements are all distinct, whereas A133743 is the sequence of smallest squares such that the pairwise sums of distinct elements are all distinct.
%H A133744 Klaus Brockhaus, <a href="/A133744/b133744.txt">Table of n, a(n) for n = 1..4944</a>
%e A133744 a(7) = A062295(7) - A133743(7) = 64 - 49 = 15.
%o A133744 (Python)
%o A133744 from collections import deque
%o A133744 from itertools import count, islice
%o A133744 def A133744_gen(): # generator of terms
%o A133744     aset2, alist, bset2, blist, aqueue, bqueue = set(), [], set(), [], deque(), deque()
%o A133744     for k in (n**2 for n in count(1)):
%o A133744         cset2 = {k<<1}
%o A133744         if (k<<1) not in aset2:
%o A133744             for a in alist:
%o A133744                 if (m:=a+k) in aset2:
%o A133744                     break
%o A133744                 cset2.add(m)
%o A133744             else:
%o A133744                 aqueue.append(k)
%o A133744                 alist.append(k)
%o A133744                 aset2.update(cset2)
%o A133744         cset2 = set()
%o A133744         for b in blist:
%o A133744             if (m:=b+k) in bset2:
%o A133744                 break
%o A133744             cset2.add(m)
%o A133744         else:
%o A133744             bqueue.append(k)
%o A133744             blist.append(k)
%o A133744             bset2.update(cset2)
%o A133744         if len(aqueue) > 0 and len(bqueue) > 0:
%o A133744             yield aqueue.popleft()-bqueue.popleft()
%o A133744 A133744_list = list(islice(A133744_gen(),30)) # _Chai Wah Wu_, Sep 11 2023
%Y A133744 Cf. A062295, A133743, A133745.
%K A133744 sign
%O A133744 1,7
%A A133744 _Klaus Brockhaus_, Sep 24 2007