A383927 Binary echo numbers: positive integers k such that the gpf(k-1) is a suffix of k when gpf(k-1) and k are written in binary.
7, 15, 19, 21, 55, 61, 63, 71, 101, 115, 127, 155, 157, 163, 181, 255, 273, 295, 301, 331, 349, 351, 365, 487, 501, 541, 573, 585, 599, 631, 687, 711, 723, 741, 781, 817, 827, 901, 1055, 1135, 1211, 1277, 1331, 1361, 1387, 1405, 1459, 1471, 1475, 1501, 1621, 1641, 1751
Offset: 1
Examples
7 is a term since 7 = 111_2, the gpf(6) = 3 = 11_2, and 11 is a suffix of 111. 21 is a term since 21 = 10101_2, the gpf(20) = 5 = 101_2, and 101 is a suffix of 10101.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..3158
Programs
-
Mathematica
Select[Range@2000,(f=IntegerDigits[FactorInteger[#-1][[-1,1]],2])==IntegerDigits[#,2][[-Length@f;;]]&] (* Giorgos Kalogeropoulos, May 15 2025 *)
-
Python
from sympy import factorint def ok(n): return n > 2 and bin(n)[2:].endswith(bin(max(factorint(n-1)))[2:]) print([k for k in range(1800) if ok(k)]) # Michael S. Branicky, May 15 2025
Comments