# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a171462 Showing 1-1 of 1 %I A171462 #26 May 12 2024 10:03:20 %S A171462 0,1,2,2,4,4,6,4,6,8,10,8,12,12,12,8,16,12,18,16,18,20,22,16,20,24,18, %T A171462 24,28,24,30,16,30,32,30,24,36,36,36,32,40,36,42,40,36,44,46,32,42,40, %U A171462 48,48,52,36,50,48,54,56,58,48,60,60,54,32,60,60,66,64,66,60,70,48,72 %N A171462 Number of hands a bartender needs to have in order to win at the blind bartender's problem with n glasses in a cycle. %C A171462 For n greater than 1, the n-th entry is given by n*(1-1/p) where p is largest prime dividing n. %D A171462 W. T. Laaser and L. Ramshaw, Probing the Rotating Table, The Mathematical Gardner (edited by David A. Klarner), Prindle, Weber & Schmidt, Boston, Massachusetts, 1981, pages 285-307. %H A171462 Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 %H A171462 R. Ehrenborg and C. Skinner, The blind bartender's problem, Journal of Combinatorial Theory, Series A 70 (1995), 249-266. %H A171462 T. Lewis and S. Williard, The rotating table, Mathematics Magazine, vol. 53, no. 3 (May 1980) pages 174-179. %F A171462 Conjecture: n > 1: k=1..n: a(n) = -n*min(A191898(n, k)/k). Verified up to n=10000. - _Mats Granvik_, Apr 19 2021 %F A171462 a(n) = n - A052126(n) = n - n/A006530(n). - _Antti Karttunen_, Jan 03 2024 %e A171462 a(4) = 2 since in the classical problem with 4 glasses on a tray, the blind bartender needs 2 hands. %t A171462 {0}~Join~Array[# (1 - 1/FactorInteger[#][[-1, 1]]) &, 72, 2] (* _Michael De Vlieger_, Jul 08 2020 *) %o A171462 (PARI) a(n) = {if (n == 1, return (0)); f = factor(n); p = f[#f~,1]; return (n * (p - 1)/p);} \\ _Michel Marcus_, Jun 09 2013 %o A171462 (Haskell) %o A171462 a171462 n = div n p * (p - 1) where p = a006530 n %o A171462 -- _Reinhard Zumkeller_, Apr 06 2015 %o A171462 (Python) %o A171462 from sympy import primefactors %o A171462 def a(n): return 0 if n == 1 else n - n//(primefactors(n)[-1]) %o A171462 print([a(n) for n in range(1, 74)]) # _Michael S. Branicky_, Apr 19 2021 %Y A171462 Cf. A006530, A052126, A060681. %K A171462 easy,nonn %O A171462 1,3 %A A171462 _Richard Ehrenborg_, Dec 09 2009 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE