|
|
A306352
|
|
a(n) is the least k >= 0 such that all the positive divisors of n have a distinct value under the mapping d -> d AND k (where AND denotes the bitwise AND operator).
|
|
1
|
|
|
0, 1, 2, 3, 4, 7, 2, 7, 10, 13, 2, 15, 4, 5, 6, 15, 16, 31, 2, 29, 6, 7, 2, 31, 12, 9, 10, 11, 4, 15, 2, 31, 42, 49, 6, 63, 4, 7, 6, 63, 8, 15, 2, 14, 14, 5, 2, 63, 18, 29, 18, 21, 4, 31, 6, 23, 18, 9, 2, 31, 4, 5, 14, 63, 76, 127, 2, 115, 6, 15, 2, 127, 8, 13
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
This sequence has similarities with A167234.
Will every nonnegative integer appear in the sequence?
|
|
LINKS
|
|
|
FORMULA
|
a(2^k) = 2^k - 1 for any k >= 0.
A000120(a(n)) = 1 iff n is a prime number.
Apparently:
- a(3^k) belongs to A131130 for any k > 0,
- a(5^k) belongs to A028399 for any k >= 0.
|
|
EXAMPLE
|
For n = 15:
- the divisors of 15 are: 1, 3, 5 and 15,
- their values under the mapping d -> d AND k for k = 0..6 are:
k\d| 1 3 5 15
---+-------------
0| 0 0 0 0
1| 1 1 1 1
2| 0 2 0 2
3| 1 3 1 3
4| 0 0 4 4
5| 1 1 5 5
6| 0 2 4 6
- the first row with 4 distinct values corresponds to k = 6,
- hence a(15) = 6.
|
|
PROG
|
(PARI) a(n) = my (d=divisors(n)); for (m=0, oo, if (#Set(apply(v -> bitand(v, m), d))==#d, return (m)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|