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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048725 a(n) = Xmult(n,5) or rule90(n,1). 18
0, 5, 10, 15, 20, 17, 30, 27, 40, 45, 34, 39, 60, 57, 54, 51, 80, 85, 90, 95, 68, 65, 78, 75, 120, 125, 114, 119, 108, 105, 102, 99, 160, 165, 170, 175, 180, 177, 190, 187, 136, 141, 130, 135, 156, 153, 150, 147, 240, 245, 250, 255, 228, 225, 238, 235, 216, 221, 210 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

The orbit of 1 under iteration of this function is the Sierpinski gasket A038183. It is called "rule 90" because the 8 bits of 90 = 01011010 in binary give bit k of the result as function of the value in {0,...,7} made out of bits k,k+1,k+2 of the input (i.e., floor(input / 2^k) mod 8). - M. F. Hasler, Oct 09 2017

LINKS

Table of n, a(n) for n=0..58.

FORMULA

a(n) = n XOR n*2 XOR (n XOR n*2)*2 = A048724(A048724(n)). - Reinhard Zumkeller, Nov 12 2004

a(n) = n XOR (4n). - M. F. Hasler, Oct 09 2017

EXAMPLE

   n (in binary) | 4n [binary] | n XOR 4n [binary] | [decimal] = a(n)

          0      |       0     |          0        |        0

          1      |      100    |         101       |        5

         10      |     1000    |        1010       |       10

         11      |     1100    |        1111       |       15

        100      |    10000    |       10100       |       20

        101      |    10100    |       10001       |       17

   etc.

MATHEMATICA

Table[ BitXor[4n, n], {n, 0, 60}] (* Robert G. Wilson v, Jul 06 2006 *)

PROG

(PARI) a(n)=bitxor(n, 4*n) \\ Charles R Greathouse IV, Oct 03 2016

CROSSREFS

Cf. A048720, A048705, A048710, A048727, A048729.

Cf. A038183.

Sequence in context: A137936 A283442 A109046 * A190240 A199860 A101889

Adjacent sequences:  A048722 A048723 A048724 * A048726 A048727 A048728

KEYWORD

nonn,easy

AUTHOR

Antti Karttunen, Apr 26 1999

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 19 22:04 EST 2018. Contains 299357 sequences. (Running on oeis4.)