OFFSET
1,3
COMMENTS
This sequence is a bijection from the positive integers onto the nonnegative integers (with inverse A353266); as a(1) = 0, for any prime number p, a(p) is the least value not yet in the sequence, and eventually every nonnegative integer will appear in the sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program
EXAMPLE
The first terms, alongside their binary expansion, proper divisors and implied forbidden bits, are:
n a(n) bin(a(n)) proper divisors bin(forbidden)
-- ---- ------ --------------- --------------
1 0 0 {} 0
2 1 1 {1} 0
3 2 10 {1} 0
4 4 100 {1, 2} 1
5 3 11 {1} 0
6 8 1000 {1, 2, 3} 11
7 5 101 {1} 0
8 10 1010 {1, 2, 3} 101
9 9 1001 {1, 2} 10
10 12 1100 {1, 2, 3} 11
11 6 110 {1} 0
12 16 10000 {1, 2, 3, 4, 5} 1111
13 7 111 {1} 0
14 18 10010 {1, 2, 3} 101
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 04 2022
STATUS
approved