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!)
A003100 Decimal Gray code for n.
(Formerly M0486)
9

%I M0486 #43 Jun 14 2017 19:22:55

%S 0,1,2,3,4,5,6,7,8,9,19,18,17,16,15,14,13,12,11,10,20,21,22,23,24,25,

%T 26,27,28,29,39,38,37,36,35,34,33,32,31,30,40,41,42,43,44,45,46,47,48,

%U 49,59,58,57,56,55,54,53,52,51,50,60,61,62,63,64,65,66,67,68,69,79,78,77

%N Decimal Gray code for n.

%C This permutation of the nonnegative integers is not self-inverse, as previously claimed. The first exception is a(100) = 190, but a(190) = 109. - _Franklin T. Adams-Watters_, Mar 05 2010

%C a(n) = A118757(n) for n<=100, = a(100)=A118757(100)=190, but a(101)=191, A118757(101)=180. - _Reinhard Zumkeller_, May 01 2006

%D M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 18.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Franklin T. Adams-Watters, <a href="/A003100/b003100.txt">Table of n, a(n) for n = 0..10000</a>

%H A. J. Cole, <a href="http://www.jstor.org/stable/3611934">Cyclic progressive number systems</a>, Math. Gaz., 50 (1966), 122-131.

%H A. J. Cole, <a href="/A003100/a003100.pdf">Cyclic progressive number systems</a>, Math. Gaz., 50 (1966), 122-131. [Annotated scanned copy]

%H Henry W. Gould, <a href="/A003099/a003099.pdf">Letters to N. J. A. Sloane, Oct 1973 and Jan 1974</a>.

%H D. E. Knuth, <a href="http://www-cs-faculty.stanford.edu/~knuth/fasc2a.ps.gz">Gray Codes</a> (Vol. 4 of TAOCP)

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%p A003100 :=proc(n)

%p local s,i:

%p s:=[op(convert(n,base,10)),0]:

%p add(piecewise(s[i+1] mod 2=0,s[i],9-s[i])*10^(i-1),i=1..nops(s)-1) :

%p end proc:

%p seq(A003100(j),j=0..100); # Pab Ter, Oct 14 2005

%Y Inverse is A174025.

%K nonn,base,easy,look

%O 0,3

%A _N. J. A. Sloane_, _Henry W. Gould_

%E More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 14 2005

%E Incorrect comment replaced by _Franklin T. Adams-Watters_, Mar 05 2010

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 April 19 13:40 EDT 2024. Contains 371792 sequences. (Running on oeis4.)