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.

A359708 a(n) is the greatest divisor d of 2*n such that the binary expansions of d and 2*n have no common 1-bit.

Original entry on oeis.org

1, 2, 1, 4, 5, 3, 1, 8, 9, 10, 1, 6, 1, 2, 1, 16, 17, 18, 1, 20, 21, 2, 1, 12, 5, 2, 9, 7, 1, 3, 1, 32, 33, 34, 1, 36, 37, 19, 1, 40, 41, 42, 1, 4, 5, 2, 1, 24, 1, 25, 17, 4, 1, 18, 1, 14, 1, 2, 1, 6, 1, 2, 1, 64, 65, 66, 1, 68, 69, 35, 1, 72, 73, 74, 1, 38, 1
Offset: 1

Views

Author

Rémy Sigrist, Jan 12 2023

Keywords

Comments

Odd numbers share a 1-bit (2^0) with all their divisors, hence this sequence deals with even numbers.

Examples

			For n = 12:
- we have (with AND denoting the bitwise AND operator):
    d   d AND 24
    --  --------
     1         0
     2         0
     3         0
     4         0
     6         0
     8         8
    12         8
    24        24
- hence a(12) = 6.
		

Crossrefs

Programs

  • PARI
    a(n) = fordiv (n, d, if (bitand(n/d, 2*n)==0, return (n/d)))

Formula

a(n) = n iff n belongs to A003714.