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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265904 Self-inverse permutation of nonnegative integers: a(n) = A263272(A263273(A263272(n))). 6
0, 1, 2, 3, 4, 11, 6, 29, 8, 9, 10, 5, 12, 13, 38, 33, 92, 17, 18, 83, 20, 87, 110, 35, 24, 89, 26, 27, 28, 7, 30, 37, 32, 15, 86, 23, 36, 31, 14, 39, 40, 119, 114, 281, 44, 99, 254, 65, 276, 335, 98, 51, 260, 71, 54, 245, 56, 249, 326, 101, 60, 263, 74, 261, 272, 47, 330, 353, 116, 105, 278, 53, 72, 251, 62, 267, 332, 107, 78, 269, 80, 81, 82, 19 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

A263273 conjugated with the permutation obtained from its even bisection.

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..6561

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(n) = A263272(A263273(A263272(n))).

As a composition of related permutations:

a(n) = A263272(A265352(n)).

a(n) = A265351(A263272(n)).

Other identities. For all n >= 0:

a(3*n) = 3*a(n).

A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

MATHEMATICA

f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@g[n] h[n]]]; t = Table[f[2 n]/2, {n, 0, 1000}]; Table[t[[f[t[[n + 1]]] + 1]], {n, 0, 83}] (* Michael De Vlieger, Jan 04 2016, after Jean-Fran├žois Alcover at A263273 *)

PROG

(Scheme) (define (A265904 n) (A263272 (A263273 (A263272 n))))

(Python)

from sympy import factorint

from sympy.ntheory.factor_ import digits

from operator import mul

def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)

def a038502(n):

    f=factorint(n)

    return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])

def a038500(n): return n/a038502(n)

def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)

def a263272(n): return a263273(2*n)/2

def a(n): return a263272(a263273(a263272(n))) # Indranil Ghosh, May 25 2017

CROSSREFS

Cf. A000035, A263272, A263273, A265351, A265352.

Cf. also A265902.

Cf. A265369, A266190, A266401, A266403 (other conjugates or similar derivations of A263273).

Sequence in context: A160652 A131485 A075833 * A117351 A108467 A265565

Adjacent sequences:  A265901 A265902 A265903 * A265905 A265906 A265907

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Jan 02 2016

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 24 04:38 EDT 2019. Contains 324318 sequences. (Running on oeis4.)