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!)
A331469 a(n) is the greatest value of the form p_1 + ... + p_k where p_1, ..., p_k are powers of primes and such that the concatenation of the binary representations of p_1, ..., p_k equals the binary representation of n. 1
1, 2, 3, 4, 5, 3, 7, 8, 9, 4, 11, 5, 13, 5, 8, 16, 17, 6, 19, 6, 7, 7, 23, 9, 25, 5, 27, 7, 29, 9, 31, 32, 17, 10, 18, 8, 37, 11, 20, 10, 41, 6, 43, 9, 15, 13, 47, 17, 49, 7, 26, 7, 53, 15, 28, 11, 26, 7, 59, 11, 61, 10, 32, 64, 33, 18, 67, 12, 13, 19, 71, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
We can always split the binary representation of a number into powers of 2, so the sequence is well defined.
LINKS
FORMULA
a(n) >= A162439(n).
a(n) <= n with equality iff n is a power of a prime.
EXAMPLE
For n = 22:
- the binary representation of 22 is "10110",
- we can split it into "10" and "1" and "10" (2^1 and 2^0 and 2^1),
- or into "101" and "10" (5^2 and 2^1),
- hence a(22) = max(5, 7) = 7.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A335791 A071829 A229998 * A067620 A343253 A330741
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 17 2020
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 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)