login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A169921 a(n) = n*n in the arithmetic where when digits are to be added they are multiplied, and when they are to be multiplied they are added. 3
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 210, 242, 294, 366, 458, 620, 762, 924, 2906, 3018, 440, 492, 564, 656, 768, 960, 1122, 4904, 5016, 5128, 690, 762, 854, 966, 1098, 1320, 6902, 7014, 7126, 7238, 960, 1052, 1164, 1296, 1448, 8900, 9012, 9124, 9236, 9348 (list; graph; refs; listen; history; text; internal format)
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
The four versions are A000290, A169919, A169920, A169921.
Sequence in context: A343335 A110725 A100800 * A169919 A292512 A248195
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from David Consiglio, Jr., Oct 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 05:13 EDT 2024. Contains 375375 sequences. (Running on oeis4.)