Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #67 Sep 08 2022 08:46:26
%S 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,10,4,6,8,10,12,14,16,18,20,22,9,
%T 12,15,18,21,24,27,30,33,36,16,20,24,28,32,36,40,44,48,52,25,30,35,40,
%U 45,50,55,60,65,70,36,42,48,54,60,66,72,78,84,90,49,56,63,70,77
%N a(n) is the product of the sum of the first i digits of n, as i goes from 1 to the total number of digits of n.
%C The only primes in the sequence are 2, 3, 5 and 7. - _Bernard Schott_, Nov 23 2021
%H Rémy Sigrist, <a href="/A349194/b349194.txt">Table of n, a(n) for n = 1..10000</a>
%H Malo David, <a href="/A349194/a349194_1.pdf">About the Product Sum Digit Sequence</a>
%F For n>10: a(n) = a(A059995(n))*A007953(n) where A059995(n) = floor(n/10).
%F In particular, for n<100: a(n) = floor(n/10)*A007953(n)
%F From _Bernard Schott_, Nov 23 2021: (Start)
%F a(n) = 1 iff n = 10^k, k >= 0 (A011557).
%F a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
%F a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
%F a(n) = 5 iff n = 10^k + 4, k >= 0.
%F a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
%F From _Marius A. Burtea_, Nov 23 2021: (Start)
%F a(A002275(n)) = n! = A000142(n), n >= 1.
%F a(A090843(n - 1)) = (2*n - 1)!! = A001147(n), n >= 1.
%F a(A097166(n)) = (3*n - 2)!!! = A007559(n).
%F a(A093136(n)) = 2^n = A000079(n).
%F a(A093138(n)) = 3^n = A000244(n). (End)
%e For n=256, a(256) = 2*(2+5)*(2+5+6) = 182.
%t Table[Product[Sum[Part[IntegerDigits[n],j],{j,i}],{i,Length[IntegerDigits[n]]}],{n,74}] (* _Stefano Spezia_, Nov 10 2021 *)
%o (PARI) a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ _Michel Marcus_, Nov 10 2021
%o (PARI) first(n)=if(n<9,return([1..n])); my(v=vector(n)); for(i=1,9,v[i]=i); for(i=10,n, v[i]=sumdigits(i)*v[i\10]); v \\ _Charles R Greathouse IV_, Dec 04 2021
%o (Python)
%o from math import prod
%o from itertools import accumulate
%o def a(n): return prod(accumulate(map(int, str(n))))
%o print([a(n) for n in range(1, 100)]) # _Michael S. Branicky_, Nov 10 2021
%o (Magma) f:=func<n|&*[&+[Reverse(Intseq(n))[i]:i in [1..j]]:j in [1..#Intseq(n)]]>; [f(n):n in [1..100]]; // _Marius A. Burtea_, Nov 23 2021
%Y Cf. A055642, A284001 (binary analog), A349190 (fixed points).
%Y Cf. A007953 (sum of digits), A059995 (floor(n/10)).
%Y Cf. A349278 (similar, with the last digits).
%Y Cf. A349898, A349899.
%K nonn,base,look
%O 1,2
%A _Malo David_, Nov 10 2021