login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062295 A B_2 sequence: a(n) is the smallest square such that pairwise sums of not necessarily distinct elements are all distinct. 4

%I #13 Sep 05 2023 14:54:16

%S 1,4,9,16,25,36,64,81,100,169,256,289,441,484,576,625,841,1089,1296,

%T 1444,1936,2025,2401,2601,3136,4225,4356,4624,5329,5476,5776,6084,

%U 7569,9025,10201,11449,11664,12321,12996,13456,14400,16129,17956,20164,22201

%N A B_2 sequence: a(n) is the smallest square such that pairwise sums of not necessarily distinct elements are all distinct.

%H Klaus Brockhaus, <a href="/A062295/b062295.txt">Table of n, a(n) for n = 1..4944</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/B2-Sequence.html">B2-Sequence</a>

%H <a href="/index/Br#B_2">Index entries for B_2 sequences</a>

%e 36 is in the sequence since the pairwise sums of {1, 4, 9, 16, 25, 36} are all distinct: 2, 5, 8, 10, 13, 17, 18, 20, 25, 26, 29, 32, 34, 37, 40, 41, 45, 50, 52, 61, 72.

%e 49 is not in the sequence since 1 + 49 = 25 + 25.

%o (Python)

%o from itertools import count, islice

%o def A062295_gen(): # generator of terms

%o aset1, aset2, alist = set(), set(), []

%o for k in (n**2 for n in count(1)):

%o bset2 = {k<<1}

%o if (k<<1) not in aset2:

%o for d in aset1:

%o if (m:=d+k) in aset2:

%o break

%o bset2.add(m)

%o else:

%o yield k

%o alist.append(k)

%o aset1.add(k)

%o aset2 |= bset2

%o A062295_list = list(islice(A062295_gen(),30)) # _Chai Wah Wu_, Sep 05 2023

%Y Cf. A000290, A011185, A010672, A025582, A005282, A062292, A133743, A133744.

%K nonn

%O 1,2

%A _Labos Elemer_, Jul 02 2001

%E Edited, corrected and extended by _Klaus Brockhaus_, Sep 24 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 13:55 EDT 2024. Contains 375517 sequences. (Running on oeis4.)