login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 4
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, 32, 34, 36, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A permutation of numbers.
LINKS
FORMULA
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.
EXAMPLE
Let
S1={1}
S2={2,4}
S3={3,5,7}
S4={6,8,10,12,14}
S5={9,11,13,15,17,19,21}
S6={16,18,20,22,24,26,28,30,32,34,36}
...
then S1, S2, S3, S4, S5, S6,... gives this sequence.
PROG
(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
CROSSREFS
Sequence in context: A236348 A143097 A074147 * A166014 A357527 A348357
KEYWORD
nonn,tabf
AUTHOR
Ctibor O. Zizka, May 14 2008
EXTENSIONS
Edited, extended, and offset changed from 0 to 1 by Antti Karttunen, Oct 05 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)