

A174541


Baron Munchhausen's Sequence.


1



0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,5


COMMENTS

Let n coins weighing 1, 2, ..., n grams be given. Suppose Baron Munchhausen knows which coin weighs how much, but his audience does not. Then a(n) is the minimum number of weighings the Baron must conduct on a balance scale, so as to unequivocally demonstrate the weight of at least one of the coins.
After a(1) = 0, a(n) is either 1 or 2 for all n.
a(n) = 1 for n triangular, n triangularplusone, T_n a square, and T_n a squareplusone, where T_n is the nth triangular number; a(n) = 2 for all other n > 1.


LINKS

Table of n, a(n) for n=1..105.
M. Brand, Tightening the bounds on the Baron's Omnisequence, Discrete Math., 312 (2012), 13261335.
T. Khovanova, K. Knop and A. Radul, Baron Munchhausen's Sequence, arXiv:1003.3406 [math.CO], 2010.
T. Kahovanova, K. Knop, A. Radul, Baron Munchhausen's Sequence, J. Int. Seq. 13 (2010) # 10.8.7.
T. Khovanova, A. Radul, Another Coins Sequence


EXAMPLE

a(7) = 1 because the weighing 1 + 2 + 3 < 7 conclusively demonstrates the weight of the sevengram coin.


MATHEMATICA

triangularQ[n_] := IntegerQ[ Sqrt[8n+1]]; a[1] = 0; a[n_ /; triangularQ[n]  triangularQ[n1]  IntegerQ[ Sqrt[n*(n+1)/2]]  IntegerQ[ Sqrt[n*(n+1)/2  1]]] = 1; a[_] = 2; Table[a[n], {n, 1, 105}] (* JeanFrançois Alcover, Jul 30 2012, after comments *)


PROG

(Scheme) ;;; The following Scheme program generates terms of Baron
;;; Munchhausen's Sequence.
(define (acceptable? n)
..(or (triangle? n)
......(= n 2)
......(triangle? ( n 1))
......(square? (triangle n))
......(square? ( (triangle n) 1))))
(streammap
.(lambda (n)
...(if (= n 1)
.......0
.......(if (acceptable? n)
...........1
...........2)))
.(theintegers))


CROSSREFS

Cf. A000217, A000124, A001108, A072221, A186313.
Sequence in context: A070106 A182595 A109706 * A029444 A122191 A097847
Adjacent sequences: A174538 A174539 A174540 * A174542 A174543 A174544


KEYWORD

nonn,nice


AUTHOR

Tanya Khovanova, Konstantin Knop, and Alexey Radul, Mar 21 2010


STATUS

approved



