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.

A339239 Binary self numbers (A010061) with a record gap to the next binary self number.

This page as a plain text file.
%I A339239 #6 Nov 28 2020 09:11:23
%S A339239 1,6,63,250,131070,1048574,33554426,17179869180
%N A339239 Binary self numbers (A010061) with a record gap to the next binary self number.
%C A339239 The corresponding gaps are 3, 7, 8, 20, 21, 24, 37, 42, ...
%C A339239 a(9) <= 288230376151711738.
%C A339239 Apparently, the records gaps occur for pairs of consecutive binary self numbers with a power of 2 between them. If this is generally true, then the next terms are 288230376151711738, 147573952589676412923, 37778931862957161709564, 10633823966279326983230456482242756602, 5444517870735015415413993718908291383294, 43556142965880123323311949751266331066367, ..., with the corresponding gaps 70, 77, 83, 135, 136, 137, ...
%e A339239 The first 4 binary self numbers are 1, 4, 6 and 13. The gaps between them are 3, 2 and 7. The record gaps are 3 and 7, and the corresponding terms are 1 and 6.
%t A339239 s[n_] := n + DigitCount[n, 2, 1]; selfQ[n_] := AllTrue[Range[n, n - Floor@Log2[n], -1], s[#] != n &]; dm = 0; seq = {}; n1 = 1; Do[If[selfQ[n], d = n - n1; If[d > dm, dm = d; AppendTo[seq, n1]]; n1 = n], {n, 2, 150000}]; seq
%Y A339239 Cf. A010061, A339216.
%K A339239 nonn,base,more
%O A339239 1,2
%A A339239 _Amiram Eldar_, Nov 28 2020