The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061076 a(n) is the sum of the products of the digits of all the numbers from 1 to n. 9

%I #91 Oct 20 2022 12:43:55

%S 1,3,6,10,15,21,28,36,45,45,46,48,51,55,60,66,73,81,90,90,92,96,102,

%T 110,120,132,146,162,180,180,183,189,198,210,225,243,264,288,315,315,

%U 319,327,339,355,375,399,427,459,495,495,500,510,525,545,570,600,635

%N a(n) is the sum of the products of the digits of all the numbers from 1 to n.

%C 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

%C 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

%C 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

%C 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

%D Amarnath Murthy, Smarandache friendly numbers and a few more sequences, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001.

%H Daria Micovic, <a href="/A061076/b061076.txt">Table of n, a(n) for n = 1..10000</a>

%H Amarnath Murthy, <a href="https://vixra.org/abs/1403.0845">Smarandache friendly numbers and a few more sequences</a>, vixra, 2014.

%H Luca Onnis, <a href="https://arxiv.org/abs/2203.07227">On the general Smarandache's sigma product of digits</a>, arXiv:2203.07227 [math.GM], 2022.

%F a(n) = Sum_{k = 1..n} (product of the digits of k).

%F a(10^k-1) = (45/44)*(45^k-1). - _Giovanni Resta_, Oct 18 2012

%F From _Robert Israel_, May 17 2016: (Start)

%F Partial sums of A007954.

%F G.f.: (1-x)^(-1) * Sum_{n>=0} Product_{j=0..n} Sum_{k=1..9} k * x^(k*10^j).

%F G.f. satisfies A(x) = (x + 2*x^2 + ... + 9*x^9)*(1+(1-x^10)*A(x^10))/(1-x).

%F (End)

%F 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

%e 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.

%p A007954:= n -> convert(convert(n,base,10),`*`):

%p ListTools:-PartialSums(map(A007954,[$1..100])); # _Robert Israel_, May 17 2016

%t Accumulate[Times@@IntegerDigits[#]& /@ Range[100]]

%o (PARI) pd(n) = my(d = digits(n)); prod(i=1, #d, d[i]);

%o a(n) = sum(k=1, n, pd(k)); \\ _Michel Marcus_, Feb 01 2015

%o (PARI) a(n) = {n=digits(n); p=1; d=#n; for(i=1,#n,if(n[i]==0,d=i-1;break));

%o (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

%o (Sage)

%o def A061076(n):

%o p = 0

%o i = 0

%o while i < n + 1:

%o p += prod(int(digit) for digit in str(i))

%o i += 1

%o return p # _Daria Micovic_, Apr 13 2016

%o (Python)

%o from math import prod

%o 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

%Y Cf. A002275, A007954, A037123, A047855.

%K nonn,base,easy,look

%O 1,2

%A _Amarnath Murthy_, Apr 14 2001

%E Corrected and extended by _Matthew Conroy_, Apr 16 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 3 00:27 EDT 2024. Contains 373054 sequences. (Running on oeis4.)