login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105530 Inverse permutation to A105529. 3

%I

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

%T 18,45,46,47,50,48,49,52,53,51,33,34,35,29,27,28,31,32,30,39,40,41,44,

%U 42,43

%N Inverse permutation to A105529.

%p gray := proc(inp::integer,bas::integer) local resul, digs, convdigs, compl,d ; digs := [op(convert(inp,base,bas)),0] ; convdigs := [] ; for d from 1 to nops(digs)-1 do compl := op(d,digs)-op(d+1,digs) : if compl >= 0 then convdigs := [op(convdigs),compl] ; else convdigs := [op(convdigs),bas+compl] ; fi : od : convdigs := [op(convdigs),op(-1,digs)] : resul := 0 : for d from nops(convdigs) to 1 by -1 do resul := resul*bas + op(d,convdigs) : od : RETURN(resul) ; end: for n from 0 to 50 do printf("%a,",gray(n,3)) ; od : # _R. J. Mathar_, Mar 28 2006

%Y Cf. A105529.

%K nonn

%O 0,3

%A _Gary W. Adamson_, Apr 11 2005

%E More terms from _R. J. Mathar_, Mar 28 2006

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 01:34 EDT 2019. Contains 326324 sequences. (Running on oeis4.)