login
A267100
Self-inverse permutation of natural numbers: a(1) = 1, a(A080147(n)) = A080148(n), a(A080148(n)) = A080147(n).
6
1, 3, 2, 6, 7, 4, 5, 10, 12, 8, 13, 9, 11, 16, 18, 14, 21, 15, 24, 25, 17, 26, 29, 19, 20, 22, 30, 33, 23, 27, 35, 37, 28, 40, 31, 42, 32, 44, 45, 34, 50, 36, 51, 38, 39, 53, 55, 57, 59, 41, 43, 60, 46, 62, 47, 65, 48, 66, 49, 52, 68, 54, 70, 71, 56, 58, 74, 61, 77, 63, 64, 78, 79, 67, 80, 82, 69, 72, 73, 75, 84, 76, 87, 81
OFFSET
1,2
FORMULA
a(1) = 1; for n > 1, if prime(n) mod 4 = 1, then a(n) = A080148(A267097(n)), otherwise a(n) = A080147(A267098(n)).
Other identities. For all n >= 1:
a(n) = A000720(A267101(n)).
PROG
(Scheme, two variants)
(define (A267100 n) (A000720 (A267101 n)))
(define (A267100 n) (cond ((<= n 1) n) ((= 1 (modulo (A000040 n) 4)) (A080148 (A267097 n))) (else (A080147 (A267098 n)))))
CROSSREFS
Cf. also A267107 (a more recursed variant).
Sequence in context: A207636 A125764 A023897 * A178754 A276446 A100527
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 01 2016
STATUS
approved