[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Revision History for A257690 (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(lucky(n)) = (2*a(n))-1, a(unlucky(n)) = 2*n, where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505.
(history; published version)
#8 by N. J. A. Sloane at Sun May 10 10:59:52 EDT 2015
STATUS

proposed

approved

#7 by Antti Karttunen at Sat May 09 10:20:54 EDT 2015
STATUS

editing

proposed

#6 by Antti Karttunen at Sat May 09 10:13:56 EDT 2015
CROSSREFS

Cf. also A257735 - A257738.

STATUS

proposed

editing

#5 by Antti Karttunen at Sat May 09 08:26:36 EDT 2015
STATUS

editing

proposed

#4 by Antti Karttunen at Sat May 09 07:52:11 EDT 2015
NAME

Permutation of natural numbers: a(1) = 1, a(lucky(n)) = (2*a(n))-1, a(unlucky(n)) = 2*n, where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505.

LINKS

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

FORMULA

a(1) = 1; for n > 1: if A145649(n) = 1 [i.e., if n is lucky], then a(n) = (2*a(A109497(n)))-1, otherwise a(n) = 2*a(n-A109497(n)). [Where A109497(n) gives the number of lucky numbers <= n.]

CROSSREFS

Cf. A005408, A005843, A000959, A050505, A109497, A145649.

Cf. also A257725 (similar permutation with a slightly different definition, resulting the first differing term at n=13, where a(13) = 11, while A257725(13) = 9).

#3 by Antti Karttunen at Sat May 09 07:46:34 EDT 2015
LINKS

Antti Karttunen, <a href="/A257690/b257690.txt">Table of n, a(n) for n = 1..10000</a>

#2 by Antti Karttunen at Sat May 09 07:36:42 EDT 2015
NAME

allocated for Antti KarttunenPermutation of natural numbers:

DATA

1, 2, 3, 4, 6, 8, 5, 12, 7, 16, 10, 24, 11, 14, 15, 32, 20, 48, 22, 28, 9, 30, 64, 40, 23, 96, 44, 56, 18, 60, 13, 128, 31, 80, 46, 192, 19, 88, 112, 36, 120, 26, 47, 256, 62, 160, 92, 384, 21, 38, 27, 176, 224, 72, 240, 52, 94, 512, 124, 320, 184, 768, 29, 42, 76, 54, 63, 352, 39, 448, 144, 480, 95, 104, 43, 188, 1024, 248, 55

OFFSET

1,2

PROG

(Scheme, with memoizing definec-macro)

(definec (A257690 n) (cond ((= 1 n) n) ((= 1 (A145649 n)) (+ -1 (* 2 (A257690 (A109497 n))))) (else (* 2 (A257690 (- n (A109497 n)))))))

CROSSREFS

Inverse permutation: A183089.

Cf. A257725 (similar permutation with a slightly different definition, resulting the first differing term at n=13, where a(13) = 11, while A257725(13) = 9).

KEYWORD

allocated

nonn

AUTHOR

Antti Karttunen, May 09 2015

STATUS

approved

editing

#1 by Antti Karttunen at Mon May 04 06:12:00 EDT 2015
NAME

allocated for Antti Karttunen

KEYWORD

allocated

STATUS

approved