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, 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
Offset: 1
Examples
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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..8192
- Rémy Sigrist, PARI program for A331469
- Index entries for sequences related to binary expansion of n
Programs
-
PARI
See Links section.
Formula
a(n) >= A162439(n).
a(n) <= n with equality iff n is a power of a prime.
Comments