A005282
Mian-Chowla sequence (a B_2 sequence): a(1) = 1; for n>1, a(n) = smallest number > a(n-1) such that the pairwise sums of elements are all distinct.
Original entry on oeis.org
1, 2, 4, 8, 13, 21, 31, 45, 66, 81, 97, 123, 148, 182, 204, 252, 290, 361, 401, 475, 565, 593, 662, 775, 822, 916, 970, 1016, 1159, 1312, 1395, 1523, 1572, 1821, 1896, 2029, 2254, 2379, 2510, 2780, 2925, 3155, 3354, 3591, 3797, 3998, 4297, 4433, 4779, 4851
Offset: 1
The second term is 2 because the 3 pairwise sums 1+1=2, 1+2=3, 2+2=4 are all distinct.
The third term cannot be 3 because 1+3 = 2+2. But it can be 4, since 1+4=5, 2+4=6, 4+4=8 are distinct and distinct from the earlier sums 1+1=2, 1+2=3, 2+2=4.
- P. Erdős and R. Graham, Old and new problems and results in combinatorial number theory. Monographies de L'Enseignement Mathématique (1980).
- S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.20.2.
- R. K. Guy, Unsolved Problems in Number Theory, E28.
- A. M. Mian and S. D. Chowla, On the B_2-sequences of Sidon, Proc. Nat. Acad. Sci. India, A14 (1944), 3-4.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe, Table of n, a(n) for n=1..5818 (terms less than 2*10^9)
- Thomas Bloom, Problem 340, Erdős Problems.
- Yin Choi Cheng, Greedy Sidon sets for linear forms, J. Num. Theor. (2024).
- Rachel Lewis, Mian-Chowla and B2 sequences, 1999. [Thanks to _Steven Finch_ for providing this document. Included with permission. - _N. J. A. Sloane_, Jan 02 2020]
- Kevin O'Bryant, B_h-Sets and Rigidity, arXiv:2312.10910 [math.NT], 2023.
- Raffaele Salvia, Table of n, a(n) for n=1...25000
- R. Salvia, A New Lower Bound for the Distinct Distance Constant, J. Int. Seq. 18 (2015) # 15.4.8.
- N. J. A. Sloane, Handwritten notes on Self-Generating Sequences, 1970 (note that A1148 has now become A005282)
- Eric Weisstein's World of Mathematics, B2 Sequence.
- Eric Weisstein's World of Mathematics, Chowla Sequence.
- Zhang Zhen-Xiang, A B_2-sequence with larger reciprocal sum, Math. Comp. 60 (1993), 835-839.
- Index entries for B_2 sequences.
A259964 has a greater sum of reciprocals.
-
import Data.Set (Set, empty, insert, member)
a005282 n = a005282_list !! (n-1)
a005282_list = sMianChowla [] 1 empty where
sMianChowla :: [Integer] -> Integer -> Set Integer -> [Integer]
sMianChowla sums z s | s' == empty = sMianChowla sums (z+1) s
| otherwise = z : sMianChowla (z:sums) (z+1) s
where s' = try (z:sums) s
try :: [Integer] -> Set Integer -> Set Integer
try [] s = s
try (x:sums) s | (z+x) `member` s = empty
| otherwise = try sums $ insert (z+x) s
-- Reinhard Zumkeller, Mar 02 2011
-
a[1]:= 1: P:= {2}: A:= {1}:
for n from 2 to 100 do
for t from a[n-1]+1 do
Pt:= map(`+`,A union {t},t);
if Pt intersect P = {} then break fi
od:
a[n]:= t;
A:= A union {t};
P:= P union Pt;
od:
seq(a[n],n=1..100); # Robert Israel, Sep 21 2014
-
t = {1}; sms = {2}; k = 1; Do[k++; While[Intersection[sms, k + t] != {}, k++]; sms = Join[sms, t + k, {2 k}]; AppendTo[t, k], {49}]; t (* T. D. Noe, Mar 02 2011 *)
-
A005282_vec(N, A=[1], U=[0], D(A, n=#A)=vector(n-1, k, A[n]-A[n-k]))={ while(#A2 && U=U[k-1..-1]);A} \\ M. F. Hasler, Oct 09 2019
-
aupto(L)= my(S=vector(L), A=[1]); for(i=2, L, for(j=1, #A, if(S[i-A[j]], next(2))); for(j=1, #A, S[i-A[j]]=1); A=concat(A, i)); A \\ Ruud H.G. van Tol, Jun 30 2025
-
from itertools import count, islice
def A005282_gen(): # generator of terms
aset1, aset2, alist = set(), set(), []
for k in count(1):
bset2 = {k<<1}
if (k<<1) not in aset2:
for d in aset1:
if (m:=d+k) in aset2:
break
bset2.add(m)
else:
yield k
alist.append(k)
aset1.add(k)
aset2 |= bset2
A005282_list = list(islice(A005282_gen(),30)) # Chai Wah Wu, Sep 05 2023
A080201
Numbers that do not occur as differences between terms of the Mian-Chowla variant A051788.
Original entry on oeis.org
49, 50, 71, 72, 76, 82, 90, 93, 95, 96, 119, 128, 139, 143, 152, 162, 172, 173, 180, 182, 185, 188
Offset: 1
A080222
Record-setting differences between adjacent elements of the Mian-Chowla sequence A005282.
Original entry on oeis.org
1, 2, 4, 5, 8, 10, 14, 21, 26, 34, 48, 71, 74, 90, 113, 143, 153, 249, 270, 299, 346, 453, 535, 940, 1052, 1226, 1347, 1365, 2443, 2511, 4253, 4254, 6116, 7339, 8898, 13621, 15567, 17940, 21061, 21307, 25558, 35749, 39437, 46664, 62709
Offset: 1
a(12)=71 because A005282(17)-A005282(16)=361-290=71 is greater than all previous differences. a(45)=A005282(619)-A005282(618)=3738616-3675907=62709
A080932
Non-occurring pairwise differences between the elements of the Mian-Chowla sequence variant A058335.
Original entry on oeis.org
26, 33, 50, 55, 68, 93, 94, 98, 107, 108, 109, 115, 122, 138, 144, 150, 155, 163, 178, 181, 182, 183, 185, 186, 193, 196, 200, 202, 204, 208, 210, 212, 223, 227, 232, 235, 239, 242, 245, 250, 253, 257, 263, 264, 268
Offset: 1
A247556
Exact differential base (a B_2 sequence) constructed as follows: Start with a(0)=0. For n>=1, let S be the set of all differences a(j)-a(i) for 0 <= i < j <= n-1, and let d be the smallest positive integer not in S. If, for every i in 1..n-1, a(n-1) + d - a(i) is not in S, then a(n) = a(n-1) + d. Otherwise, let r be the smallest positive integer such that, for every i in 1..n-1, neither a(n-1) + r - a(i) nor a(n-1) + r + d - a(i) is in S; then a(n) = a(n-1) + r and a(n+1) = a(n) + d.
Original entry on oeis.org
0, 1, 3, 7, 12, 20, 30, 44, 65, 80, 96, 143, 165, 199, 224, 306, 332, 415, 443, 591, 624, 678, 716, 934, 973, 1134, 1174, 1449, 1491, 1674, 1720, 2113, 2161, 2468, 2517, 2855, 2906, 2961, 3245, 3302, 3711, 3772, 4081, 4148, 4603, 4673, 5557, 5628, 5917, 5989
Offset: 0
Given a(0)=0, a(1)=1, a(2)=3, a(3)=7, the differences used are 1,2,3,4,6,7, so d=5, and we can use a(4) = a(3)+d = 7+5 = 12 because appending a(4)=12 to the sequence will result in the differences 12-0=12, 12-1=11, 12-3=9, 12-7=5, none of which had already been used.
Similarly, given a(0)..a(4) = 0,1,3,7,12, the differences used are 1..7,9,11,12, so d=8, and we can use a(5) = a(4)+d = 12+8 = 20 because the resulting differences will be 20, 19, 17, 13, 8, none of which had already been used.
Proceeding as above, we get a(6)=30 and a(7)=44.
Given a(0)..a(7) = 0,1,3,7,12,20,30,44, the differences used are 1..14,17..20,23..24,27,29..30,32,37,41,43..44, so d=15, but we cannot use a(8) = a(7)+d = 44+15 = 59 because the difference 29 would be repeated: 59-30 = 30-1. Thus, we must find the smallest r such that using both a(8) = a(7)+r and a(9) = a(8)+d will not repeat any differences. The smallest such r is 21, so a(8) = a(7)+r = 44+21 = 65 and a(9) = a(8)+d = 65+15 = 80.
- Jerzy Browkin, Rozwiązanie pewnego zagadnienia A. Schinzla (Polish) [The solution of a certain problem of A. Schinzel], Roczniki Polskiego Towarzystwa Matematycznego [Annals Polish Mathematical Society], Seria I, Prace Matematyczne III (1959).
Cf.
A001856, where a(1)=1, a(2)=2, a(2n+1)=2*a(2n), a(2n+2) = a(2n+1) + d.
A080933
Smallest non-occurring pairwise difference between the elements of a Mian-Chowla sequence (A005282) variant starting with (1,n).
Original entry on oeis.org
33, 49, 26, 15, 30, 19, 44, 13, 38, 50, 54, 58, 44, 46, 25, 20, 45, 10, 13, 84, 38, 15, 71, 33, 35, 54, 31, 16, 57, 10, 42, 26, 15, 14, 33, 14, 15, 32, 34, 16, 25, 28, 25, 16, 36, 16, 16, 25, 28, 40, 16, 31, 33, 28, 15, 31, 15, 22, 31, 33, 15, 21, 49, 51, 28
Offset: 2
a(2)=33 because the smallest non-occurring pairwise difference between the terms of A005282 (starting with 1,2) is A080200(1)=33. a(3)=49 because the smallest non-occurring pairwise difference between the terms of A051788 (starting with 1,3) is A080201(1)=49. a(4)=26 because the smallest non-occurring pairwise difference between the terms of A058335 (starting with 1,4) is A080932(1)=26.
Showing 1-6 of 6 results.
Comments