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!)
A324400 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(n) = -1 if n = 2^k and k > 0, and f(n) = n for all other numbers. 57
1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 10, 11, 12, 13, 2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 2, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 2, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
In the following, A stands for this sequence, A324400, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j >= 1: S(i) = S(i) => T(i) = T(j).
For example, the following chains of implications hold:
A -> A286619 -> A005811,
and
A -> A003602 -> A286622 -> A000120,
-> A323889,
-> A000593,
-> A001227,
among many others.
LINKS
FORMULA
If n <= 3, a(n) = n; and for n >= 4, if A209229(n) = 1, then a(n) = 2, otherwise a(n) = 1 + n - A000523(n).
PROG
(PARI)
A000523(n) = if(n<1, 0, #binary(n)-1);
A324400(n) = if(n<4, n, if(!bitand(n, n-1), 2, 1+n-A000523(n)));
CROSSREFS
Cf. A000523.
Sequence in context: A324346 A323904 A325810 * A297157 A304492 A305303
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 01 2019
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 July 6 21:56 EDT 2024. Contains 374058 sequences. (Running on oeis4.)