|
|
A061076
|
|
a(n) is the sum of the products of the digits of all the numbers from 1 to n.
|
|
9
|
|
|
1, 3, 6, 10, 15, 21, 28, 36, 45, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 90, 92, 96, 102, 110, 120, 132, 146, 162, 180, 180, 183, 189, 198, 210, 225, 243, 264, 288, 315, 315, 319, 327, 339, 355, 375, 399, 427, 459, 495, 495, 500, 510, 525, 545, 570, 600, 635
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
What is the asymptotic behavior of this sequence? a(n) = a(n+1) for almost all n. A weak upper bound: a(n) << n^1.91. - Charles R Greathouse IV, Jan 13 2012
A check was done for k in {i^j | 1 <= i <= 10 AND 1 <= j <= 100}. For all these values, a(k) < k^1.733. Another check for k in {i^j | 101 <= i <= 110 AND 101 <= j <= 200} gave a(k) < k^1.65324. For k in {i | 10^6 <= i <= 10^7}, a(k) < k^1.6534. So I ask: is it true that a(n) < n^1.733 and a(n) -> n^(1.65323 + o(1)), or about n^(log(45)/log(10) + o(1))? - David A. Corneth, May 17 2016
For n = 10^(k-1), the closed-form formula from Mihai Teodor (see Formula section) gives a(n) = (45^k - 45)/44, so lim_{n->oo} log(a(n))/log_10(n) = log(45) = 3.80666248977.... - Jon E. Schoenfield, Apr 10 2022
For k >= 1, a(10^k-1) = a(10^k) = ... = a(10*R_k) where R = A002275; so there is a run of 10*R_{k-1} + 2 = A047855(k) consecutive terms equal to (45/44)*(45^k-1) when n runs from 10^k-1 up to 10*R_k, this is because those numbers have one or more 0's. Example: first runs with 2, 12, 112, 1112, ... consecutive terms equal to 45, 2070, 93195, 4193820, ... start at 9, 99, 999, 9999, ... and end at 10, 110, 1110, 11110, ... - Bernard Schott, Oct 18 2022
|
|
REFERENCES
|
Amarnath Murthy, Smarandache friendly numbers and a few more sequences, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k = 1..n} (product of the digits of k).
G.f.: (1-x)^(-1) * Sum_{n>=0} Product_{j=0..n} Sum_{k=1..9} k * x^(k*10^j).
G.f. satisfies A(x) = (x + 2*x^2 + ... + 9*x^9)*(1+(1-x^10)*A(x^10))/(1-x).
(End)
Let b(1), b(2), ..., b(k) be the digits of the base-10 expansion of n: n = b(1)*10^(k-1) + b(2)*10^(k-2) + ... + b(k). Then a(n) = b(1)*b(2)*...*b(k) + (45^k-45)/44 + (1/2)*Sum_{i=1..k} b(1)*b(2)*...*b(i)*(b(i)-1)*45^(k-i). - Mihai Teodor, Apr 09 2022
|
|
EXAMPLE
|
a(9) = a(10) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1*0 = 1+2+3+4+5+6+7+8+9 = 45.
|
|
MAPLE
|
A007954:= n -> convert(convert(n, base, 10), `*`):
|
|
MATHEMATICA
|
Accumulate[Times@@IntegerDigits[#]& /@ Range[100]]
|
|
PROG
|
(PARI) pd(n) = my(d = digits(n)); prod(i=1, #d, d[i]);
(PARI) a(n) = {n=digits(n); p=1; d=#n; for(i=1, #n, if(n[i]==0, d=i-1; break));
(45/44) * (45^(#n-1)-1) + sum(i=1, d, p*=n[i]; p * (n[i]-1) * (45/44) * (45^(#n -i) - 45^(#n-i-1)) / 2)+p*(d==#n)} \\ David A. Corneth, May 17 2016
(Sage)
p = 0
i = 0
while i < n + 1:
p += prod(int(digit) for digit in str(i))
i += 1
(Python)
from math import prod
def A061076(n): return sum(prod(int(d) for d in str(i)) for i in range(1, n+1)) # Chai Wah Wu, Mar 21 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|