cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A257734 Permutation of natural numbers: a(1) = 1, a(lucky(n)) = ludic(1+a(n-1)), a(unlucky(n)) = nonludic(a(n)), where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505, and ludic = A003309, nonludic = A192607.

This page as a plain text file.
%I A257734 #12 May 07 2015 11:01:32
%S A257734 1,4,2,9,6,16,7,12,3,26,14,20,25,8,13,38,22,31,36,15,61,21,54,33,17,
%T A257734 45,51,24,81,32,41,73,5,48,27,62,119,69,35,105,46,57,47,96,10,65,39,
%U A257734 82,83,151,115,92,50,135,63,76,64,124,18,86,55,106,23,108,189,146,43,118,193,68,169,84,91,100,149,85,156,28,179,111,74,136,34
%N A257734 Permutation of natural numbers: a(1) = 1, a(lucky(n)) = ludic(1+a(n-1)), a(unlucky(n)) = nonludic(a(n)), where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505, and ludic = A003309, nonludic = A192607.
%H A257734 Antti Karttunen, <a href="/A257734/b257734.txt">Table of n, a(n) for n = 1..10000</a>
%H A257734 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A257734 a(1) = 1; for n > 1: if A145649(n) = 1 [i.e., if n is lucky], then a(n) = A003309(1+a(A109497(n)-1)), otherwise a(n) = A192607(a(n-A109497(n))).
%F A257734 As a composition of other permutations:
%F A257734 a(n) = A255421(A257732(n)).
%F A257734 a(n) = A237126(A257725(n)).
%o A257734 (Scheme, with memoization-macro definec)
%o A257734 (definec (A257734 n) (cond ((= 1 n) n) ((= 1 (A145649 n)) (A003309 (+ 1 (A257734 (- (A109497 n) 1))))) (else (A192607 (A257734 (- n (A109497 n)))))))
%o A257734 ;; Alternatively, by composing other permutations:
%o A257734 (define (A257734 n) (A255421 (A257732 n)))
%o A257734 (define (A257734 n) (A237126 (A257725 n)))
%Y A257734 Inverse: A257733.
%Y A257734 Cf. A000959, A050505, A003309, A109497, A145649, A192607.
%Y A257734 Related or similar permutations: A237126, A255421, A257725, A257732.
%Y A257734 Cf. also A256486, A256487.
%K A257734 nonn
%O A257734 1,2
%A A257734 _Antti Karttunen_, May 06 2015