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.

Showing 1-3 of 3 results.

A064894 Binary dilution of n. GCD of exponents in binary expansion of n.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Marc LeBrun, Oct 11 2001

Keywords

Comments

All bits of n in positions not divisible by a(n) are zero. Hence n in binary contains blocks of a(n)-1 "diluting" 0's (for n>1). Also for n>1, a(2^n) = a(2^n + 1) = n. For i,j odd, a(ij) = GCD(a(i),a(j)).

Examples

			577 = 2^0 + 2^6 + 2^9, GCD(0,6,9) = 3 = a(577).
		

Crossrefs

Programs

  • Mathematica
    A064894[n_] := Apply[GCD, Flatten[Position[Reverse[IntegerDigits[n, 2]], 1]] - 1];
    Array[A064894, 100, 0] (* Paolo Xausa, Feb 13 2024 *)
  • PARI
    a(n) = if (n==0, 0, my(ve = select(x->x==1, Vecrev(binary(n)), 1)); gcd(vector(#ve, k, ve[k]-1))); \\ Michel Marcus, Apr 12 2016

Formula

If n = 2^e0 + 2^e1 +... then a(n) = GCD(e0, e1, ...).
a(A064896(n)) = A056538(n)

A356354 a(n) is the least k such that the sets of positions of 1's in the binary expansions of n and k are similar.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 3, 7, 1, 3, 3, 11, 3, 11, 7, 15, 1, 3, 3, 19, 3, 7, 11, 23, 3, 19, 11, 27, 7, 23, 15, 31, 1, 3, 3, 35, 3, 37, 19, 39, 3, 37, 7, 43, 11, 45, 23, 47, 3, 35, 19, 51, 11, 43, 27, 55, 7, 39, 23, 55, 15, 47, 31, 63, 1, 3, 3, 67, 3, 11, 35, 71, 3, 7
Offset: 0

Views

Author

Rémy Sigrist, Oct 15 2022

Keywords

Comments

Let s(n) be the set of terms in the n-th row of A133457 (with s(0) = {}).
a(n) is the least k such that s(n) is the image of s(k) under some nonconstant linear function.

Examples

			The first terms, alongside their binary expansions, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     1      10          1
   3     3      11         11
   4     1     100          1
   5     3     101         11
   6     3     110         11
   7     7     111        111
   8     1    1000          1
   9     3    1001         11
  10     3    1010         11
  11    11    1011       1011
  12     3    1100         11
  13    11    1101       1011
  14     7    1110        111
  15    15    1111       1111
  16     1   10000          1
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

A000120(a(n)) = A000120(n).
a(a(n)) = a(n).
a(2*n) = a(n).
a(A030101(n)) = a(n).
a(n) = 1 iff n is a power of 2.
a(n) = 3 iff n belongs to A018900.
a(2^k - 1) = 2^k - 1 for any k >= 0.

A356365 For any nonnegative integer n with binary expansion Sum_{k = 1..w} 2^e_k, let m be the least integer such that the values e_k mod m are all distinct; a(n) = Sum_{k = 1..w} 2^(e_k mod m).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 3, 7, 1, 3, 3, 11, 3, 13, 7, 15, 1, 3, 3, 19, 6, 7, 7, 23, 3, 25, 11, 27, 7, 29, 15, 31, 1, 3, 6, 7, 3, 7, 7, 39, 5, 11, 7, 43, 14, 15, 15, 47, 3, 7, 19, 51, 7, 53, 23, 55, 7, 57, 27, 59, 15, 61, 31, 63, 1, 5, 3, 7, 5, 7, 7, 71, 3, 13, 14, 15
Offset: 0

Views

Author

Rémy Sigrist, Oct 16 2022

Keywords

Comments

See A293390 for the corresponding m's.

Examples

			The first terms, alongside their binary expansions and the corresponding m's, are:
  n    a(n)  bin(n)   bin(a(n))  m
  ---  ----  -------  ---------  -
    0     0        0          0  0
    1     1        1          1  1
    2     1       10          1  1
    3     3       11         11  2
    4     1      100          1  1
    5     5      101        101  3
    6     3      110         11  2
    7     7      111        111  3
    8     1     1000          1  1
    9     3     1001         11  2
   10     3     1010         11  3
   11    11     1011       1011  4
   12     3     1100         11  2
   13    13     1101       1101  4
   14     7     1110        111  3
   15    15     1111       1111  4
   16     1    10000          1  1
		

Crossrefs

Programs

  • PARI
    a(n) = { my (b=vector(hammingweight(n))); for (i=1, #b, n-=2^b[i]=valuation(n,2);); for (m=1, oo, if (#Set(b%m)==#b, b%=m; break;);); sum(i=1, #b, 2^b[i]); }

Formula

A000120(a(n)) = A000120(n).
a(n) = 1 iff n is a power of 2.
a(2^k - 1) = 2^k - 1 for any k >= 0.
Showing 1-3 of 3 results.