login
A371384
a(n) is the denominator of the arithmetic mean of the digits of n.
5
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,11
MATHEMATICA
a[n_]:=Denominator[Mean[IntegerDigits[n]]]; Array[a, 90, 0]
PROG
(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
CROSSREFS
Sequence in context: A196563 A198890 A305831 * A022927 A063435 A262352
KEYWORD
nonn,base,easy,frac
AUTHOR
Stefano Spezia, Mar 20 2024
STATUS
approved