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.

A133743 a(n) is the smallest positive square such that pairwise sums of distinct elements are all distinct.

This page as a plain text file.
%I A133743 #15 Feb 16 2025 08:33:06
%S A133743 1,4,9,16,25,36,49,100,144,169,225,256,361,441,484,625,729,784,1156,
%T A133743 1521,1600,1764,2401,2704,3364,4096,4225,4356,4900,5184,5929,6889,
%U A133743 7921,8836,9216,9409,10404,11881,13689,13924,14161,18496,19321,20449,21316
%N A133743 a(n) is the smallest positive square such that pairwise sums of distinct elements are all distinct.
%H A133743 Klaus Brockhaus, <a href="/A133743/b133743.txt">Table of n, a(n) for n = 1..4948</a>
%H A133743 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/B2-Sequence.html">B2-Sequence</a>
%H A133743 <a href="/index/Br#B_2">Index entries for B_2 sequences</a>
%e A133743 49 is in the sequence since the pairwise sums of distinct elements of {1, 4, 9, 16, 25, 36, 49} are all distinct: 5, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 45, 50, 52, 53, 58, 61, 65, 74, 85.
%e A133743 64 is not in the sequence since 1 + 64 = 16 + 49.
%o A133743 (Python)
%o A133743 from itertools import count, islice
%o A133743 def A133743_gen(): # generator of terms
%o A133743     aset2, alist = set(), []
%o A133743     for k in map(lambda x:x**2, count(1)):
%o A133743         bset2 = set()
%o A133743         for a in alist:
%o A133743             if (b:=a+k) in aset2:
%o A133743                 break
%o A133743             bset2.add(b)
%o A133743         else:
%o A133743             yield k
%o A133743             alist.append(k)
%o A133743             aset2.update(bset2)
%o A133743 A133743_list = list(islice(A133743_gen(),30)) # _Chai Wah Wu_, Sep 11 2023
%Y A133743 Cf. A000290, A062295, A133744, A133745.
%K A133743 nonn
%O A133743 1,2
%A A133743 _Klaus Brockhaus_, Sep 24 2007