cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

Original entry on oeis.org

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
Offset: 1

Views

Author

Rémy Sigrist, Feb 09 2019

Keywords

Comments

This sequence has similarities with A167234.
Will every nonnegative integer appear in the sequence?

Examples

			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.
		

Crossrefs

Programs

  • PARI
    a(n) = my (d=divisors(n)); for (m=0, oo, if (#Set(apply(v -> bitand(v, m), d))==#d, return (m)))

Formula

a(2^k) = 2^k - 1 for any k >= 0.
a(n) = 2 iff n belongs to A002145.
a(n) <= A218388(n).
a(n) AND A218388(n) = a(n).
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.