A235485 Permutation of natural numbers: a(n) = A235201(A235487(n)).
0, 1, 2, 4, 3, 7, 8, 6, 5, 16, 14, 17, 12, 19, 9, 28, 10, 13, 32, 11, 21, 24, 34, 53, 20, 49, 38, 64, 18, 43, 56, 59, 15, 68, 26, 42, 48, 37, 22, 76, 35, 67, 36, 23, 51, 112, 106, 107, 40, 27, 98, 52, 57, 29, 128, 119, 30, 44, 86, 41, 84, 131, 118, 96, 25, 133, 136, 31, 39, 212, 63, 73, 80
Offset: 0
Keywords
Links
Crossrefs
Programs
-
Scheme
(define (A235485 n) (A235201 (A235487 n))) ;; Alternative implementation based on the given direct recurrence. Needs Antti Karttunen's IntSeq-library: (definec (A235485 n) (cond ((< n 3) n) ((zero? (modulo n 3)) (* 4 (A235485 (/ n 3)))) ((zero? (modulo n 8)) (* 5 (A235485 (/ n 8)))) ((zero? (modulo n 4)) (* 3 (A235485 (/ n 4)))) ((zero? (modulo n 14)) (* 9 (A235485 (/ n 14)))) ((zero? (modulo n 49)) (* 27 (A235485 (/ n 49)))) ((zero? (modulo n 7)) (* 6 (A235485 (/ n 7)))) ((= 1 (A010051 n)) (A000040 (A235485 (A000720 n)))) (else (reduce * 1 (map A235485 (ifactor n))))))
Formula
As a recurrence:
a(0)=0, a(1)=1, a(2)=2,
a(3*n) = 4*a(n),
a(8*n) = 5*a(n),
a(4*n) = 3*a(n) [when n is odd],
a(14*n) = 9*a(n),
a(49*n) = 27*a(n),
a(7*n) = 6*a(n) [when n is odd and not divisible by 7],
a(p_i) = p_{a(i)} for primes whose index i is neither 2 nor 4 [primes other than 3 or 7],
and
a(u * v) = a(u) * a(v) for other composite cases.
Extensions
Name and incorrect claim about multiplicativity corrected by Antti Karttunen, Feb 12 2018
Comments