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!)
A352449 2^k appears in the binary expansion of a(n) iff 2^k appears in the binary expansion of n and k AND n = k (where AND denotes the bitwise AND operator). 5
0, 1, 0, 3, 0, 1, 4, 7, 0, 1, 0, 11, 0, 1, 4, 15, 0, 1, 0, 3, 16, 17, 20, 23, 0, 1, 0, 11, 16, 17, 20, 31, 0, 1, 0, 3, 0, 33, 4, 39, 0, 1, 0, 11, 0, 33, 4, 47, 0, 1, 0, 3, 16, 49, 20, 55, 0, 1, 0, 11, 16, 49, 20, 63, 0, 1, 0, 3, 0, 1, 68, 71, 0, 1, 0, 11, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
The idea is to keep the 1's in the binary expansion of a number whose positions are related in some way to that number.
LINKS
FORMULA
a(n) <= n with equality iff n belongs to A309274.
EXAMPLE
For n = 42:
- 42 = 2^5 + 2^3 + 2^1,
- 42 AND 5 = 0 <> 5,
- 42 AND 3 = 2 <> 3,
- 42 AND 1 = 0 <> 1,
- so a(42) = 0.
PROG
(PARI) a(n) = { my (v=0, m=n, k); while (m, m-=2^k=valuation(m, 2); if (bitand(n, k)==k, v+=2^k)); v }
CROSSREFS
See A352450, A352451, A352452, A352458 for similar sequences.
Cf. A309274 (fixed points).
Sequence in context: A106683 A139601 A213191 * A079520 A229001 A208981
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 16 2022
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 May 7 13:58 EDT 2024. Contains 372310 sequences. (Running on oeis4.)