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.

A034757 a(1)=1, a(n) = smallest odd number such that all sums of pairs of (not necessarily distinct) terms in the sequence are distinct.

This page as a plain text file.
%I A034757 #25 Sep 05 2023 18:26:05
%S A034757 1,3,7,15,25,41,61,89,131,161,193,245,295,363,407,503,579,721,801,949,
%T A034757 1129,1185,1323,1549,1643,1831,1939,2031,2317,2623,2789,3045,3143,
%U A034757 3641,3791,4057,4507,4757,5019,5559,5849,6309,6707,7181,7593
%N A034757 a(1)=1, a(n) = smallest odd number such that all sums of pairs of (not necessarily distinct) terms in the sequence are distinct.
%C A034757 a(1) = 1, a(n) = least number such that every difference a(i)-a(j) is a distinct even number. - _Amarnath Murthy_, Apr 07 2004
%H A034757 Reinhard Zumkeller, <a href="/A034757/b034757.txt">Table of n, a(n) for n = 1..1000</a>
%F A034757 a(n) = 2*A005282(n)-1. (David Wasserman)
%e A034757 5 is not in the sequence since 5+1 is already obtainable from 3+3, 9 is excluded since 1, 3 and 7 are in the sequence and would collide with 1+9
%t A034757 seq2={1, 3}; Do[le=Length[seq2]; t=Last[seq2]+2; While[Length[Expand[(Plus @@ (x^seq2) + x^t)^2]] < Pochhammer[3, le]/le!, t=t+2]; AppendTo[seq2, t], {20}]; Print@seq2
%o A034757 (Haskell)
%o A034757 a034757 = (subtract 1) . (* 2) . a005282  -- _Reinhard Zumkeller_, Dec 18 2012
%o A034757 (Python)
%o A034757 from itertools import count, islice
%o A034757 def A034757_gen(): # generator of terms
%o A034757     aset1, aset2, alist = set(), set(), []
%o A034757     for k in count(1,2):
%o A034757         bset2 = {k<<1}
%o A034757         if (k<<1) not in aset2:
%o A034757             for d in aset1:
%o A034757                 if (m:=d+k) in aset2:
%o A034757                     break
%o A034757                 bset2.add(m)
%o A034757             else:
%o A034757                 yield k
%o A034757                 alist.append(k)
%o A034757                 aset1.add(k)
%o A034757                 aset2.update(bset2)
%o A034757 A034757_list = list(islice(A034757_gen(),30)) # _Chai Wah Wu_, Sep 05 2023
%Y A034757 Cf. A025582, A051912, A055598.
%Y A034757 Partial sums of A287178.
%K A034757 nonn,nice,easy
%O A034757 1,2
%A A034757 _Wouter Meeussen_, Jun 01 2000
%E A034757 An incorrect comment from _Amarnath Murthy_, also dated Apr 07 2004, has been deleted.
%E A034757 Offset fixed by _Reinhard Zumkeller_, Dec 18 2012