OFFSET
0,2
COMMENTS
How should the carry digits be handled? In this version they have been handled by simply adding them in the old way, which is a bit worrisome. For example, in the calculation below, when the column containing 7 and 6 is "added", i.e. multiplied, there is a carry of 4, which here has been added to the 2 to get 6.
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 0..10000
EXAMPLE
a(15) = 15*15 = 620:
....15
....15
------
....70
...26.
------
...620
------
PROG
(Python)
from math import prod
def A169921(m):
n = len(str(m))+1
hold = [x for x in list(zip(*[list(str(sum((int(b)+int(d))*10**a for a, b in enumerate(reversed(str(m))))).ljust(c+n, "X").rjust(8, "X")) for c, d in enumerate(reversed(str(m)))])) if x != ('X', )*(n-1)]
store = [prod([int(b) for b in c if b.isdigit()])*10**a for a, c in enumerate(reversed(hold))]
return sum(store)
# David Consiglio, Oct 24 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from David Consiglio, Jr., Oct 24 2022
STATUS
approved