OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..81
FORMULA
Conjecture: a(A007494(n)) = 1.
From Chai Wah Wu, Dec 12 2024: (Start)
The above conjecture is true, i.e. if n == 0 or 2 mod 3, then a(n) = 1.
Proof: if m is a n-digit integer with mean of digits equal to its digital root k, then sum of digits of m is k*n.
Then m mod 9 = k*n mod 9. Since the digital root is k = 1 + (m-1) mod 9, this means that k = 1 + (k*n-1) mod 9. As 1<=k<=9, for n == 2, 3, 5, 6, 8, 9 mod 9 the only k that satisfies this equation is k=9. Then the only corresponding m whose digit sum is 9*n is 10^n-1. Thus a(n) = 1.
Other results:
Theorem 1: If n == 4 or 7 mod 9, then a(n) is the number of n-digit nonnegative integers with digit sum a multiple of 3*n.
Proof: Follows from the fact that the only k that satisfies k = 1 + (k*n-1) mod 9 is k = 3, 6, or 9.
Theorem 2: If n>1 and n == 1 mod 9, then a(n) is the number of n-digit nonnegative integers with digit sum a multiple of n.
Proof: Since n>1, the digital root of an n-digit integer is > 0. The result then follows from the fact that k = 1 + (k*n-1) mod 9 is satisfied for all 1<=k<=9.
(End)
MATHEMATICA
PROG
(Python)
from math import prod, factorial
from sympy.utilities.iterables import partitions
def A378838(n):
if n==1: return 10
if n%3!=1: return 1
k, c, f = n%9, 0, factorial(n-1)
a = 3*n if k==4 or k==7 else n
for i in range(a, 9*n+1, a):
for s, p in partitions(i, m=n, k=9, size=True):
v = list(p.values())
p = prod((factorial(i) for i in v))*factorial(n-s)
c += sum(f*i//p for i in v)
return c # Chai Wah Wu, Dec 12 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Dec 09 2024
EXTENSIONS
a(11)-a(36) from Chai Wah Wu, Dec 12 2024
STATUS
approved