OFFSET
1,1
FORMULA
a((10^n-1)/3) = (1/836)*(15*(19*45^n-63) + 44*3^((3*n)/2)*(sqrt(3)*sin((Pi*n)/6) + 15*cos((Pi*n)/6))).
G.f. of the subsequence a((10^n-1)/3): 9*(2 - 32*x + 135*x^2)/((1 - x)*(1 - 45*x)*(1 - 9*x + 27*x^2)).
a((10^n-1)/3) = 55*a((10^(n-1)-1)/3) - 486*a((10^(n-2)-1)/3) + 1647*a((10^(n-3)-1)/3) - 1215*a((10^(n-4)-1)/3) for n > 4.
EXAMPLE
a(4) = 20 since the first 4 positive multiples of 3 are 3,6,9 and 12 and the sum of the product of their digits is 3 + 6 + 9 + 1*2 = 20.
MATHEMATICA
Accumulate[Times @@@ IntegerDigits[Range[3, 999 , 3]]]
PROG
(PARI) a(n)={sum(k=1, n, vecprod(digits(3*k)))} \\ Andrew Howroyd, Feb 09 2023
(Python)
from math import prod
def A360365(n): return sum(prod(int(d) for d in str(m)) for m in range(3, 3*n+1, 3)) # Chai Wah Wu, Feb 28 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Luca Onnis, Feb 09 2023
STATUS
approved