login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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