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!)
A264974 Self-inverse permutation of natural numbers: a(n) = A263273(4*n) / 4. 15
0, 1, 2, 3, 4, 5, 6, 7, 16, 9, 10, 19, 12, 13, 14, 15, 8, 17, 18, 11, 20, 21, 34, 43, 48, 25, 52, 27, 28, 55, 30, 37, 46, 57, 22, 49, 36, 31, 58, 39, 40, 41, 42, 23, 50, 45, 32, 59, 24, 35, 44, 51, 26, 53, 54, 29, 56, 33, 38, 47, 60, 61, 142, 63, 88, 169, 102, 115, 124, 129, 70, 151, 144, 97, 178, 75, 106, 133, 156, 79, 160, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = A263273(4*n) / 4.
a(n) = A264986(n) / 2 = A263272(2*n) / 2.
As a composition of related permutations:
a(n) = A264975(A263272(n)) = A263272(A264976(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.]
A264978(n) = a(2n)/2. [Thus the restriction onto even numbers induces yet another permutation.]
PROG
(Scheme, three variants)
(define (A264974 n) (/ (A263273 (* 4 n)) 4))
(define (A264974 n) (/ (A264986 n) 2))
(define (A264974 n) (/ (A263272 (* 2 n)) 2))
(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 a(n): return a263273(4*n)/4 # Indranil Ghosh, May 25 2017
CROSSREFS
Terms of A264986 halved.
Cf. also A264975, A264976.
Sequence in context: A367933 A356194 A065640 * A334953 A308334 A161673
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 05 2015
STATUS
approved

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 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)