

A228085


a(n) = number of distinct k which satisfy n = k + wt(k), where wt(k) (A000120) gives the number of 1's in binary representation of a nonnegative integer k.


22



1, 0, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,6


COMMENTS

wt(k) is also called bitcount(k).
a(n) = number of times n occurs in A092391.
The first 2 occurs at n=5 (as we have two solutions A092391(3) = A092391(4) = 5).
The first 3 occurs at n=129 (as we have three solutions A092391(123) = A092391(124) = A092391(128) = 129).
The first 4 occurs at n=4102, where we have solutions A092391(4091) = A092391(4092) = A092391(4099) = A092391(4100) = 4102.
A number with five inverses was found by Donovan Johnson, Oct 19 2013, namely 2^136 + 6, which has inverses 2^136  129, 2^136  125, 2^136  124, 2^136 + 3, 2^136 + 4.  N. J. A. Sloane, Oct 20 2013.
Comment from Donovan Johnson, Oct 22 2013 (Start):
I wrote a new program that is more efficient than the previous one I used. The new program only checks the last 20 bits for each inverse because when the inverse is < 2^m, all of the most significant bits are 1's. When the inverse is >= 2^m, the most significant bits are a 1 followed by all 0's.
Here is the smallest I found:
5 inverses: 2^136 + 6 (same as what I sent previously)
6 inverses: 2^260 + 130
7 inverses: 2^4233 + 130
8 inverses: 2^8206 + 4103
I have checked m values (exponents) up to 10^6 and did not find a solution for 9 inverses. (End)


REFERENCES

Max A. Alekseyev, Donovan Johnson and N. J. A. Sloane, On Kaprekar's Junction Numbers, in preparation, 2017.


LINKS

Antti Karttunen, Table of n, a(n) for n = 0..8191
Index entries for Colombian or self numbers and related sequences


MAPLE

For Maple code see A230091.  N. J. A. Sloane, Oct 10 2013
# Find all inverses of m under x > x + wt(x)  N. J. A. Sloane, Oct 19 2013
A000120 := proc(n) local w, m, i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (mi)/2; od; w; end: wt := A000120;
F:=proc(m) local ans, lb, n, i;
lb:=mceil(log(m+1)/log(2)); ans:=[];
for n from max(1, lb) to m do if (n+wt(n)) = m then ans:=[op(ans), n]; fi; od:
[seq(ans[i], i=1..nops(ans))];
end;


PROG

(Haskell)
a228085 n = length $ filter ((== n) . a092391) [n  a070939 n .. n]
 Reinhard Zumkeller, Oct 13 2013


CROSSREFS

A010061 gives the position of zeros, A228082 the positions of nonzeros, A228088 the positions of ones. Cf. A000120, A010062, A092391, A228086, A228087, A228091 (positions of 2's), A227643, A228088, A230058, A230092 (positions of 3's), A230093, A227915 (positions of 4's), A070939.
Sequence in context: A286627 A182071 A317992 * A154782 A265196 A171157
Adjacent sequences: A228082 A228083 A228084 * A228086 A228087 A228088


KEYWORD

nonn


AUTHOR

Antti Karttunen, Aug 09 2013


STATUS

approved



