OFFSET
1,3
COMMENTS
For n greater than 1, the n-th entry is given by n*(1-1/p) where p is largest prime dividing n.
REFERENCES
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.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
R. Ehrenborg and C. Skinner, The blind bartender's problem, Journal of Combinatorial Theory, Series A 70 (1995), 249-266.
T. Lewis and S. Williard, The rotating table, Mathematics Magazine, vol. 53, no. 3 (May 1980) pages 174-179.
FORMULA
Conjecture: n > 1: k=1..n: a(n) = -n*min(A191898(n, k)/k). Verified up to n=10000. - Mats Granvik, Apr 19 2021
EXAMPLE
a(4) = 2 since in the classical problem with 4 glasses on a tray, the blind bartender needs 2 hands.
MATHEMATICA
{0}~Join~Array[# (1 - 1/FactorInteger[#][[-1, 1]]) &, 72, 2] (* Michael De Vlieger, Jul 08 2020 *)
PROG
(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
(Haskell)
a171462 n = div n p * (p - 1) where p = a006530 n
-- Reinhard Zumkeller, Apr 06 2015
(Python)
from sympy import primefactors
def a(n): return 0 if n == 1 else n - n//(primefactors(n)[-1])
print([a(n) for n in range(1, 74)]) # Michael S. Branicky, Apr 19 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Richard Ehrenborg, Dec 09 2009
STATUS
approved