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.
%I A138607 #19 Mar 15 2022 08:16:42 %S A138607 1,2,4,3,5,7,6,8,10,12,14,9,11,13,15,17,19,21,16,18,20,22,24,26,28,30, %T A138607 32,34,36,23,25,27,29,31,33,35,37,39,41,43,45,47,38,40,42,44,46,48,50, %U A138607 52,54,56,58,60,62,64,66,68,70,49,51,53,55,57,59,61,63,65,67,69,71,73 %N A138607 List first A008578(1) odd numbers, then first A008578(2) even numbers, then the next A008578(3) odd numbers, then the next A008578(4) even numbers, etc. %C A138607 A permutation of numbers. %H A138607 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A138607 If n < 3, a(n) = n. If n-2 = A007504(A083375(n-2)), then a(n) = a(n-1-A000040(A083375(n-2)))+2, otherwise a(n) = a(n-1)+2. - _Antti Karttunen_, Oct 05 2009. %e A138607 Let %e A138607 S1={1} %e A138607 S2={2,4} %e A138607 S3={3,5,7} %e A138607 S4={6,8,10,12,14} %e A138607 S5={9,11,13,15,17,19,21} %e A138607 S6={16,18,20,22,24,26,28,30,32,34,36} %e A138607 ... %e A138607 then S1, S2, S3, S4, S5, S6,... gives this sequence. %o A138607 (MIT Scheme:) (define (A138607 n) (if (< n 3) n (let ((k (A083375 (- n 2)))) (if (= (- n 2) (A007504 k)) (+ 2 (A138607 (- n 1 (A000040 k)))) (+ 2 (A138607 (-1+ n))))))) ;; _Antti Karttunen_, Oct 05 2009 %Y A138607 Inverse: A166014. Cf. A138606, A138608, A138609, A138612. %K A138607 nonn,tabf %O A138607 1,2 %A A138607 _Ctibor O. Zizka_, May 14 2008 %E A138607 Edited, extended, and offset changed from 0 to 1 by _Antti Karttunen_, Oct 05 2009