A371384 a(n) is the denominator of the arithmetic mean of the digits of n.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 0
Links
Programs
-
Mathematica
a[n_]:=Denominator[Mean[IntegerDigits[n]]]; Array[a,90,0]
-
Python
from math import gcd def A371384(n): return (l:=len(s:=str(n)))//gcd(l,sum(map(int,s))) # Chai Wah Wu, Mar 22 2024
Comments