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!)
A318578 Let k be the greatest odd divisor of n and let S be the sequence of positive integers not in the sequence so far in increasing order. Then a(n) = S(k). 1
1, 2, 5, 3, 9, 7, 13, 4, 17, 12, 21, 10, 25, 18, 29, 6, 33, 23, 37, 16, 41, 28, 45, 14, 49, 34, 53, 24, 57, 39, 61, 8, 65, 44, 69, 31, 73, 50, 77, 22, 81, 55, 85, 38, 89, 60, 93, 19, 97, 66, 101, 46, 105, 71, 109, 32, 113, 76, 117, 52, 121, 82, 125, 11, 129, 87, 133 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
In other words, a(n) = A000265(n)-th positive integer unused so far.
A permutation of the positive integers.
a(n) = 2n - 1 for odd n, a(n) < 2n - 1 otherwise.
LINKS
EXAMPLE
For n=6, the highest odd divisor of n is k = 3. The sequence up to that point is 1, 2, 5, 3, 9. The numbers which are not yet in the sequence (in increasing order) are S = 4, 6, 7, 8, 10, ... and the 3rd of these is 7, which is therefore a(6).
MATHEMATICA
Fold[Append[#1, Complement[Range[Max[#1] + (r = #2/2^IntegerExponent[#2, 2])], #1][[r]]] &, {1}, Range[2, 67]]
CROSSREFS
Sequence in context: A182480 A193974 A319499 * A119435 A352783 A193972
KEYWORD
nonn
AUTHOR
Ivan Neretin, Aug 29 2018
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 11:52 EDT 2024. Contains 371779 sequences. (Running on oeis4.)