[go: up one dir, main page]

login
Revision History for A269858 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Permutation of natural numbers: a(1) = 1, a(2n) = A065090(1+a(n)), a(2n+1) = A000040(a(A268674(2n+1))).
(history; published version)
#5 by N. J. A. Sloane at Mon Mar 07 12:32:30 EST 2016
STATUS

proposed

approved

#4 by Antti Karttunen at Sun Mar 06 15:09:51 EST 2016
STATUS

editing

proposed

Discussion
Sun Mar 06
15:10
Antti Karttunen: Where ((prime? n) (A007097 (A000720 n))) was the extra-kludge, mathematically unnecessary, but enabled the computation in sane amount of time and memory.
#3 by Antti Karttunen at Sun Mar 06 15:07:10 EST 2016
DATA

1, 2, 3, 4, 5, 6, 11, 8, 7, 9, 31, 10, 127, 18, 13, 14, 709, 12, 5381, 15, 19, 45, 52711, 16, 17, 165, 23, 27, 648391, 21, 9737333, 22, 29, 856, 41, 20, 174440041, 6185, 61, 24, 3657500101, 28, 88362852307, 63, 43, 58644, 2428095424619, 25, 59, 26, 37, 212, 75063692618249, 34, 67, 39, 47

COMMENTS

Terms for prime positions copied from A007097.

FORMULA

Other identities. For all n >= 1:

a(A000040(n)) = A007097(n). [Maps primes to the primeth recurrence.]

CROSSREFS
Discussion
Sun Mar 06
15:09
Antti Karttunen: I computed the terms this way:
(define listA007097 '(1 2 3 5 11 31 127 709 5381 52711 648391 9737333 
 174440041 3657500101 88362852307 2428095424619 
 75063692618249 2586559730396077 98552043847093519 
 4123221751654370051 188272405179937051081 
 9332039515881088707361 499720579610303128776791))

(define (A007097 n) (list-ref listA007097 n))

(definec (A269858 n) ;; o=1: Also a(n) = A237739(A252756(n)).
  (cond ((<= n 1) n)
        ((prime? n) (A007097 (A000720 n)))
        ((even? n) (A065090 (+ 1 (A269858 (/ n 2)))))
        (else (A000040 (A269858 (A268674 n))))
  )
)
#2 by Antti Karttunen at Sun Mar 06 14:48:47 EST 2016
NAME

allocated for Antti KarttunenPermutation of natural numbers: a(1) = 1, a(2n) = A065090(1+a(n)), a(2n+1) = A000040(a(A268674(2n+1))).

DATA

1, 2, 3, 4, 5, 6, 11, 8, 7, 9, 31, 10, 127, 18, 13, 14, 709, 12, 5381, 15, 19, 45, 52711, 16, 17, 165, 23, 27, 648391, 21

OFFSET

1,2

LINKS

<a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

FORMULA

a(1) = 1, a(2) = 2, for n > 2, if n is even, a(n) = A002808(a(n/2)-1), and for odd n, a(n) = A000040(a(A268674(n))).

As a composition of other permutations:

a(n) = A237739(A252756(n)).

PROG

(Scheme, with memoization-macro definec)

(definec (A269858 n) (cond ((<= n 1) n) ((even? n) (A065090 (+ 1 (A269858 (/ n 2))))) (else (A000040 (A269858 (A268674 n))))))

CROSSREFS

Inverse: A269857.

Cf. A000040, A065090, A268674.

Related or similar permutations: A237739, A252756, A269848.

KEYWORD

allocated

nonn

AUTHOR

Antti Karttunen, Mar 06 2016

STATUS

approved

editing

#1 by Antti Karttunen at Sun Mar 06 12:01:49 EST 2016
NAME

allocated for Antti Karttunen

KEYWORD

allocated

STATUS

approved