The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A352451 2^k appears in the binary expansion of a(n) iff 2^k appears in the binary expansion of n and k+1 divides n. 5
0, 1, 2, 1, 0, 1, 6, 1, 8, 1, 2, 1, 12, 1, 2, 5, 0, 1, 2, 1, 16, 5, 2, 1, 8, 17, 2, 1, 8, 1, 22, 1, 0, 1, 2, 1, 36, 1, 2, 5, 8, 1, 34, 1, 8, 5, 2, 1, 32, 1, 18, 1, 0, 1, 38, 17, 8, 1, 2, 1, 60, 1, 2, 5, 0, 1, 2, 1, 0, 5, 66, 1, 8, 1, 2, 1, 8, 65, 6, 1, 16, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
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.
EXAMPLE
For n = 42:
- 42 = 2^5 + 2^3 + 2^1,
- 5+1 divides 42,
- 3+1 does not divide 42,
- 1+1 divides 42,
- so a(42) = 2^5 + 2^1 = 34.
PROG
(PARI) a(n) = { my (v=0, m=n, k); while (m, m-=2^k=valuation(m, 2); if (n%(k+1)==0, v+=2^k)); v }
CROSSREFS
See A352449, A352450, A352452, A352458 for similar sequences.
Sequence in context: A302978 A108723 A291584 * A349618 A321615 A011126
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 21 01:24 EDT 2024. Contains 372720 sequences. (Running on oeis4.)