A174541 Baron Münchhausen's Sequence.
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
Offset: 1
Examples
a(7) = 1 because the weighing 1 + 2 + 3 < 7 conclusively demonstrates the weight of the seven-gram coin.
Links
- M. Brand, Tightening the bounds on the Baron's Omni-sequence, Discrete Math., 312 (2012), 1326-1335.
- Tanya Khovanova, Konstantin Knop and A. Radul, Baron Münchhausen's Sequence, arXiv:1003.3406 [math.CO], 2010.
- Tanya Khovanova, Konstantin Knop, and A. Radul, Baron Münchhausen's Sequence, J. Int. Seq. 13 (2010) # 10.8.7.
- Tanya Khovanova and A. Radul, Another Coins Sequence
Programs
-
Mathematica
triangularQ[n_] := IntegerQ[ Sqrt[8n+1]]; a[1] = 0; a[n_ /; triangularQ[n] || triangularQ[n-1] || IntegerQ[ Sqrt[n*(n+1)/2]] || IntegerQ[ Sqrt[n*(n+1)/2 - 1]]] = 1; a[] = 2; Table[a[n], {n, 1, 105}] (* _Jean-François Alcover, Jul 30 2012, after comments *)
-
Scheme
;;; The following Scheme program generates terms of Baron ;;; Münchhausen's Sequence. (define (acceptable? n) (or (triangle? n) (= n 2) (triangle? (- n 1)) (square? (triangle n)) (square? (- (triangle n) 1)))) (stream-map (lambda (n) (if (= n 1) 0 (if (acceptable? n) 1 2))) (the-integers))
Comments