OFFSET
1,3
COMMENTS
For n > 0, with prime factorization Product_{i=1..k} p_i ^ e_i (all p_i distinct and all e_i > 0):
- let S_n = A000961 \ { p_i ^ (e_i + j) with i=1..k and j > 0 },
- a(n) = Sum_{i=1..k} 2^#{ s in S_n with 1 < s < p_i ^ e_i }.
In an informal way, we encode the prime powers > 1 that are unitary divisors of n as 1's in binary, while discarding the 0's corresponding to their "proper" multiples.
a(A002110(n)) = 2^n-1 for any n >= 0.
a(A000961(n+1)) = 2^(n-1) for any n > 0.
A000120(a(n)) = A001221(n) for any n > 0 (each prime divisor p of n (alongside the p-adic valuation of n) is encoded as a single 1 bit in the base-2 representation of a(n)).
A000961(2+A007814(a(n))) = A034684(n) for any n > 1 (the least significant bit of a(n) encodes the smallest unitary divisor of n that is larger than 1).
This sequence establishes a bijection between the positive numbers and the nonnegative numbers; see A289272 for the inverse of this sequence.
The numbers 4, 36, 40 and 532 equal their image; are there other such numbers?
LINKS
EXAMPLE
For n = 204 = 2^2 * 3 * 17:
- S_204 = A000961 \ { 2^3, 2^4, ..., 3^2, ... }
= { 1, 2, 3, 4, 5, 7, 11, 13, 17, ... },
- a(204) = 2^#{ 2, 3 } + 2^#{ 2 } + 2^#{ 2, 3, 4, 5, 7, 11, 13 }
= 2^2 + 2^1 + 2^7
= 134.
See also the illustration of the first terms in Links section.
PROG
(PARI) See Links section.
(PARI) A289271(n) = { my(f = factor(n), pps = vecsort(vector(#f~, i, f[i, 1]^f[i, 2])), s=0, x=1, pp=1, k=-1); for(i=1, #f~, while(pp < pps[i], pp++; while(!isprimepower(pp)||(gcd(pp, x)>1), pp++); k++); s += 2^k; x *= pp); (s); }; \\ Antti Karttunen, Jan 01 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jun 30 2017
STATUS
approved