login
a(n) is the product of the sum of the last i digits of n, with i going from 1 to the total number of digits of n.
6

%I #30 Dec 19 2021 11:17:55

%S 1,2,3,4,5,6,7,8,9,0,2,6,12,20,30,42,56,72,90,0,3,8,15,24,35,48,63,80,

%T 99,0,4,10,18,28,40,54,70,88,108,0,5,12,21,32,45,60,77,96,117,0,6,14,

%U 24,36,50,66,84,104,126,0,7,16,27,40,55,72,91,112,135,0

%N a(n) is the product of the sum of the last i digits of n, with i going from 1 to the total number of digits of n.

%C This is similar to A349194 but with digits taken in reversed order.

%C The only primes in the sequence are 2, 3, 5 and 7. - _Bernard Schott_, Dec 04 2021

%C The positive terms form a subsequence of A349194. - _Bernard Schott_, Dec 19 2021

%H Michel Marcus, <a href="/A349278/b349278.txt">Table of n, a(n) for n = 1..10000</a>

%F From _Bernard Schott_, Dec 04 2021: (Start)

%F a(n) = 0 iff n is a multiple of 10 (A008592).

%F a(n) = 1 iff n = 1.

%F a(n) = 2 (resp. 3, 4, 5, 7, 9) iff n = 10^k+1 (A000533) (resp. 2*10^k+1 (A199682), 3*10^k+1 (A199683), 4*10^k+1 (A199684), 6*10^k+1 (A199686), 8*10^k+1 (A199689)).

%F a(R_n) = n! where R_n = A002275(n) is repunit > 0, and n! = A000142(n).

%F a(n) = A349194(n) if n is palindrome (A002113). (End)

%e For n=256, a(256) = 6*(6+5)*(6+5+2) = 858.

%t a[n_] := Times @@ Accumulate @ Reverse @ IntegerDigits[n]; Array[a, 70] (* _Amiram Eldar_, Nov 13 2021 *)

%o (PARI) a(n) = my(d=Vecrev(digits(n))); prod(i=1, #d, sum(j=1, i, d[j]));

%o (Python)

%o from math import prod

%o from itertools import accumulate

%o def a(n): return 0 if n%10==0 else prod(accumulate(map(int, str(n)[::-1])))

%o print([a(n) for n in range(1, 71)]) # _Michael S. Branicky_, Nov 13 2021

%Y Cf. A349194, A349279 (fixed points).

%Y Cf. A349864, A349865.

%K nonn,base

%O 1,2

%A _Michel Marcus_, Nov 13 2021