OFFSET
1,2
COMMENTS
The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Nov 23 2021
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Malo David, About the Product Sum Digit Sequence
FORMULA
In particular, for n<100: a(n) = floor(n/10)*A007953(n)
From Bernard Schott, Nov 23 2021: (Start)
a(n) = 1 iff n = 10^k, k >= 0 (A011557).
a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
a(n) = 5 iff n = 10^k + 4, k >= 0.
a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
From Marius A. Burtea, Nov 23 2021: (Start)
EXAMPLE
For n=256, a(256) = 2*(2+5)*(2+5+6) = 182.
MATHEMATICA
Table[Product[Sum[Part[IntegerDigits[n], j], {j, i}], {i, Length[IntegerDigits[n]]}], {n, 74}] (* Stefano Spezia, Nov 10 2021 *)
PROG
(PARI) a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ Michel Marcus, Nov 10 2021
(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
(Python)
from math import prod
from itertools import accumulate
def a(n): return prod(accumulate(map(int, str(n))))
print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2021
(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
CROSSREFS
Cf. A349278 (similar, with the last digits).
KEYWORD
AUTHOR
Malo David, Nov 10 2021
STATUS
approved