The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A004520 Generalized nim sum n + n in base 10. 20
 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 20, 22, 24, 26, 28, 20, 22, 24, 26, 28, 40, 42, 44, 46, 48, 40, 42, 44, 46, 48, 60, 62, 64, 66, 68, 60, 62, 64, 66, 68, 80, 82, 84, 86, 88, 80, 82, 84, 86, 88, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 20, 22, 24, 26, 28, 20, 22, 24, 26, 28, 40, 42, 44, 46, 48, 40, 42 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS a(n) = n + n in carryless arithmetic mod 10. - N. J. A. Sloane, Jul 23 2010. REFERENCES E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982. J. H. Conway, On Numbers and Games. Academic Press, NY, 1976. LINKS David Applegate, Marc LeBrun and N. J. A. Sloane, Carryless Arithmetic (I): The Mod 10 Version. R. Hinze, Concrete stream calculus: An extended study, J. Funct. Progr. 20 (5-6) (2010) 463-535, doi, Section 4.4. FORMULA Generalized nim sum m + n in base q: write m and n in base q and add mod q with no carries, e.g. 5 + 8 in base 3 = "21" + "22" = "10" = 1. MATHEMATICA carrylessAdd[m_, n_, b_] := Block[{lm = IntegerLength[m, b], ln = IntegerLength[n, b]}, mx = Max[lm, ln]; idm = IntegerDigits[m, b, mx]; idn = IntegerDigits[n, b, mx]; FromDigits[ Mod[ idm + idn, b], b]]; Table[ carrylessAdd[n, n, 10], {n, 0, 76}] (* Robert G. Wilson v, Aug 23 2010 *) PROG (Python) def A004520(n):     return int(''.join(str(2*int(d) % 10) for d in str(n))) # Chai Wah Wu, Jun 29 2020 CROSSREFS When sorted and duplicates removed, gives A014263. - N. J. A. Sloane, Aug 03 2010 Sequence in context: A243590 A169933 A113603 * A169918 A169916 A073909 Adjacent sequences:  A004517 A004518 A004519 * A004521 A004522 A004523 KEYWORD nonn,base AUTHOR EXTENSIONS More terms from Robert G. Wilson v, Aug 23 2010 STATUS approved

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

Last modified July 31 02:33 EDT 2021. Contains 346367 sequences. (Running on oeis4.)