A169918 Squares in carryless arithmetic mod 10 with addition of digits defined to be multiplication mod 10 and multiplication of digits defined to be addition mod 10.
0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 210, 242, 294, 266, 258, 260, 292, 244, 216, 208, 440, 492, 464, 456, 468, 490, 442, 414, 406, 418, 690, 662, 654, 666, 698, 640, 612, 604, 616, 648, 860, 852, 864, 896, 848, 810, 802, 814, 846, 898, 50, 62, 94, 46, 18, 0, 12, 44, 96, 68, 260, 292
Offset: 0
Examples
a(17) = 17*17 = 244: ...17 ...17 ----- ...84 (7*7 = 7+7 mod 10 = 4, 7*1 = 7+1 mod 10 = 8) ..28. ----- ..244 (The rule for "adding" the columns is to multiply mod 10: 8+8 = 8 * 8 mod 10 = 4. Blanks are ignored)
Crossrefs
Programs
-
PARI
A169918(n)={u=vector(#n=digits(n),i,1);n=apply(d->n+d*u,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
Extensions
Thanks to Rick L. Shepherd for pointing out a typo in the example. - N. J. A. Sloane, Nov 08 2014
Comments