

A005282


MianChowla sequence (a B_2 sequence): a(1) = 1; for n>1, a(n) = smallest number > a(n1) such that the pairwise sums of elements are all distinct.
(Formerly M1094)


46



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

An alternative definition is to start with 1 and then continue with the least number such that all pairwise differences of distinct elements are all distinct.  Jens Voß, Feb 04 2003. [However, compare A003022 and A227590.  N. J. A. Sloane, Apr 08 2016]
R. Lewis points out, at the first Weisstein link, that S, the sum of the reciprocals of this sequence, satisfies 2.158435 <= S <= 2.158677. Similarly, the sum of the squares of reciprocals of this sequence converges to approximately 1.33853369 and the sum of the cube of reciprocals of this sequence converges to approximately 1.14319352.  Jonathan Vos Post, Nov 21 2004
Let S denote the reciprocal sum of a(n). Then 2.158452685 <= S <= 2.158532684.  Raffaele Salvia, Jul 19 2014
From Thomas Ordowski, Sep 19 2014: (Start)
Known estimate: n^2/2 + O(n) < a(n) < n^3/6 + O(n^2).
Conjecture: a(n) ~ n^3 / log(n)^2.
(End)


REFERENCES

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_2sequences of Sidon, Proc. Nat. Acad. Sci. India, A14 (1944), 34.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS

T. D. Noe, Table of n, a(n) for n=1..5818 (terms less than 2*10^9)
Raffaele Salvia, Table of n, a(n) for n=1...25000
N. J. A. Sloane, Handwritten notes on SelfGenerating 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 ZhenXiang, A B_2sequence with larger reciprocal sum, Math. Comp. 60 (1993), 835839.
Index entries for B_2 sequences.


FORMULA

a(n) = A025582(n) + 1.
a(n) = (A034757(n)+1)/2.


EXAMPLE

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 earler sums 1+1=2, 1+2=3, 2+2=4.


MAPLE

a[1]:= 1: P:= {2}: A:= {1}:
for n from 2 to 100 do
for t from a[n1]+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


MATHEMATICA

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 *)


PROG

(Haskell)
import Data.Set (Set, empty, insert, member)
a005282 n = a005282_list !! (n1)
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


CROSSREFS

Cf. A051788, A080200 (for differences between terms).
Different from A046185. Cf. A011185.
See also A003022, A227590.
Sequence in context: A115266 A026039 A004978 * A046185 A259964 A218913
Adjacent sequences: A005279 A005280 A005281 * A005283 A005284 A005285


KEYWORD

nonn,nice,changed


AUTHOR

N. J. A. Sloane and Simon Plouffe


EXTENSIONS

Examples added by N. J. A. Sloane, Jun 01 2008


STATUS

approved



