OFFSET
0,3
COMMENTS
This is another decimal Gray code that considers that the distance between 9 and 0 is 1. Cyclic for (left-zero-padded) groups of n digits.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Martin Cohn, Affine m-ary Gray Codes, Information and Control, volume 6, 1963, pages 70-78. Example 4 column "Gray" is the present sequence.
Donald E. Knuth, The Art of Computer Programming, Pre-Fascicle 2A, Draft of Section 7.2.1.1. See subsection "Nonbinary Gray codes" page 18, and exercise 78 page 35 and answer page 54 (modular Gray g overline (k) for the case all m_j=10).
MAPLE
# insert 10 into the second argument of the gray(., .) function in A105530. - R. J. Mathar, Mar 10 2015
MATHEMATICA
AltGray[In_] := { tIn = IntegerDigits[In]; Ac = 0; Do[tIn[[z]] = Mod[tIn[[z]] - Ac, 10]; Ac += tIn[[z]], {z, 1, Length[tIn]}]; FromDigits[tIn, 10] }
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a098488 = fromJust . (`elemIndex` a226134_list)
-- Reinhard Zumkeller, Jun 03 2013
(PARI) a(n) = my(v=digits(n)); forstep(i=#v, 2, -1, v[i]=(v[i]-v[i-1])%10); fromdigits(v); \\ Kevin Ryde, May 15 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Jaume Simon Gispert (jaume(AT)nuem.com), Sep 10 2004
STATUS
approved