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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048647 Write n in base 4, then replace each digit by its base 4 negative. 16
0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 48, 51, 50, 49, 60, 63, 62, 61, 56, 59, 58, 57, 52, 55, 54, 53, 32, 35, 34, 33, 44, 47, 46, 45, 40, 43, 42, 41, 36, 39, 38, 37, 16, 19, 18, 17, 28, 31, 30, 29, 24, 27, 26, 25, 20, 23, 22, 21, 192, 195, 194, 193, 204, 207, 206 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

The graph of a(n) on [ 1..4^k ] resembles a plane fractal of fractal dimension 1.

Self-inverse considered as a permutation of the positive integers.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..16383

J. W. Layman, View fractal-like graph

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(n) = if n = 0 then 0 else 4*a(floor(n/4)) + if m = 0 then 0 else 4 - m, where m = n mod 4. - Reinhard Zumkeller, Apr 08 2013

EXAMPLE

a(15)=5, since 15 = 33(base 4) -> 11(base 4) = 5.

MATHEMATICA

Table[FromDigits[If[#==0, 0, 4-#]&/@IntegerDigits[n, 4], 4], {n, 0, 70}] (* Harvey P. Dale, Jul 23 2012 *)

PROG

(Haskell)

a048647 0 = 0

a048647 n = 4 * a048647 n' + if m == 0 then 0 else 4 - m

            where (n', m) = divMod n 4

-- Reinhard Zumkeller, Apr 08 2013

CROSSREFS

Cf. A065256.

Cf. A007090.

Sequence in context: A092582 A213262 A068440 * A180190 A059438 A156628

Adjacent sequences:  A048644 A048645 A048646 * A048648 A048649 A048650

KEYWORD

nonn,easy,nice,base

AUTHOR

John W. Layman (layman(AT)math.vt.edu (7/5/99))

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 24 12:28 EDT 2013. Contains 225620 sequences.