|
|
A257731
|
|
Permutation of natural numbers: a(1) = 1, a(prime(n)) = lucky(1+a(n)), a(composite(n)) = unlucky(a(n)), where prime(n) = n-th prime number A000040, composite(n) = n-th composite number A002808 and lucky = A000959, unlucky = A050505.
|
|
6
|
|
|
1, 3, 9, 2, 33, 5, 7, 14, 4, 45, 163, 8, 15, 11, 20, 6, 25, 59, 63, 203, 12, 22, 13, 17, 28, 10, 35, 78, 235, 83, 1093, 251, 18, 30, 19, 24, 31, 39, 16, 47, 67, 101, 43, 290, 107, 1283, 87, 309, 26, 41, 27, 34, 21, 42, 53, 23, 61, 88, 115, 128, 321, 57, 354, 137, 1499, 112, 349, 376, 36, 55, 1401, 38, 49, 46, 29, 56, 70, 32, 99, 81
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
As a composition of other permutations:
|
|
PROG
|
(Scheme, with memoization-macro definec)
;; Alternatively, by composing other permutations:
|
|
CROSSREFS
|
Differs from A257733 for the first time at n=19, where a(19) = 63, while A257733(19) = 203.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|