[go: up one dir, main page]

login
A169917
Squares in carryless arithmetic mod 10 with addition and multiplication of digits both defined to be multiplication mod 10.
3
0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 100, 111, 144, 199, 166, 155, 166, 199, 144, 111, 400, 441, 464, 469, 446, 405, 446, 469, 464, 441, 900, 991, 964, 919, 946, 955, 946, 919, 964, 991, 600, 661, 644, 649, 666, 605, 666, 649, 644, 661, 500, 551, 504, 559, 506, 555, 506, 559, 504
OFFSET
0,3
COMMENTS
The rules of arithmetic used in A169916, A169917, A169918 have very strange consequences. Many of the familiar laws fail. For instance, the arithmetic in A169916 is not associative: 10*(9*2) = 10*1 = 21 != (10*9)*2 = 9*2 = 1.
FORMULA
a(n) = a(n') if the i-th digit of n' either equals the i-th digit of n or (10 - the i-th digit of n): e.g., a(12345) = a(18365), because the 2nd and 4th digit of 12345 equal 10-(the 2nd resp. 4th digit of 18365), and the other digits are the same. In particular, a(10k+5+m) = a(10k+5-m), for m=0,...,4. - M. F. Hasler, Mar 26 2015
EXAMPLE
a(24) = 24*24 = 446:
...24
...24
-----
...86
..48.
-----
..446
(The rule for "adding" the columns is to multiply mod 10: 8+8 = 8 * 8 mod 10 = 4.)
PROG
(PARI) A169917(n)={#n=digits(n); n=apply(d->n*d, n)%10; sum(i=0, 2*#n-2, prod(j=max(1, #n-i), min(2*#n-1-i, #n), n[2*#n-i-j][j])%10*10^i)} \\ M. F. Hasler, Mar 26 2015
CROSSREFS
The four versions are A059729, A169916, A169917, A169918.
Sequence in context: A186723 A008959 A316347 * A059729 A184988 A108533
KEYWORD
nonn,base
AUTHOR
STATUS
approved