[go: up one dir, main page]

login
A061078
Sum of the products of the digits of the first n positive even numbers.
5
2, 6, 12, 20, 20, 22, 26, 32, 40, 40, 44, 52, 64, 80, 80, 86, 98, 116, 140, 140, 148, 164, 188, 220, 220, 230, 250, 280, 320, 320, 332, 356, 392, 440, 440, 454, 482, 524, 580, 580, 596, 628, 676, 740, 740, 758, 794, 848, 920, 920, 920, 920, 920, 920, 920, 922
OFFSET
1,1
COMMENTS
For n = (10^r)/2, a(n) is the sum of the r terms of the geometric progression with first term 20 and common ratio 45.
REFERENCES
Amarnath Murthy, Smarandache friendly numbers and a few more sequences, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001.
FORMULA
From Luca Onnis, Mar 13 2022: (Start)
a(5*10^n-1) = a(5*10^n) = (5/11)*(45^(n+1)-1).
a(n) <= (5/11)*(45^(log((n+1)/5)+1)-1) for all n.
a(n) ~ (4/5)*A061077(n) as n -> infinity.
Conjecture: let a >= 1, b >= 0, where p is not a multiple of 2 nor 5. Then:
a(5^a*2^b*p-1) = a(5^a*2^b*p) = ... = a(5^a*2^b*p + 55...5) where the number of fives is equal to b if a > b, and is equal to a-1 if 1 <= a <= b. (End)
EXAMPLE
a(5) = 2 + 4 + 6 + 8 + 1*0 = 20; (a(18)=116, not 114).
a(1199) = a(5^2*2^4*3 - 1) = ... = a(5^2*2^4*3 + 5) = a(1205). In fact, the number of "fives" is exactly equal to 1 = 2-1 (where 2 is the exponent of 5).
MATHEMATICA
Accumulate[Times@@@IntegerDigits[Range[2, 120, 2]]] (* Harvey P. Dale, Jun 18 2021 *)
PROG
(PARI) pd(n) = my(d = digits(n)); prod(i=1, #d, d[i]);
a(n) = sum(k=1, n, pd(2*k)); \\ Michel Marcus, Feb 01 2015
(PARI) a(n) = sum(k=1, n, vecprod(digits(2*k))); \\ Michel Marcus, Mar 13 2022
(PARI) a(n) = {t=digits(2*n); p=1; d=#t; for(i=1, #t, if(t[i]==0, d=i-1; break));
(5/11) * (45^(#t-1)-1) + (sum(i=1, #t-1, ((prod(j=1, #t-i-1, t[j])) * (t[#t-i]) * (t[#t-i]-1) * 2 * (5^(i))* (9^(i-1)))))+(prod(k=1, #t-1, t[k]))*((((t[#t])^2))/4+(t[#t])/2)} \\ Luca Onnis, Mar 17 2022
(Python)
from math import prod
from itertools import accumulate
def p(n): return prod(map(int, str(n)))
def a(n): return sum(p(2*i) for i in range(1, n+1))
def aupton(nn): return list(accumulate([pd(2*k) for k in range(1, nn+1)]))
print(aupton(56)) # Michael S. Branicky, Mar 13 2022
CROSSREFS
Sequence in context: A305702 A152222 A139082 * A067114 A102711 A235375
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 14 2001
EXTENSIONS
Corrected and extended by Matthew Conroy, Apr 17 2001
Incorrect formula removed by Luca Onnis, Mar 13 2022
Name clarified by Chai Wah Wu, Mar 21 2022
STATUS
approved