OFFSET
1,2
COMMENTS
By "reversal" of k's representation in binary, it is meant: write k in binary, reverse the order of its digits, and read the result as a binary value.
It seems (verified for the first 120000 entries) that a(n) = A057890(n+1). - R. J. Mathar, Jun 18 2009
Indeed, this is A057890 (palindromes with optional trailing zeros) without the initial term. In other bases this does not have to be so, as illustrated by A071687. - Ivan Neretin, Sep 04 2015
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
24 in binary is 11000. The reversal of this is 11 (ignoring leading 0's), which is 3 in decimal. Since 3 divides 24, then 24 is included in this sequence.
MAPLE
A030101 := proc(n) local bdgs ; bdgs := convert(n, base, 2) ; add( op(-i, bdgs)*2^(i-1), i=1..nops(bdgs)) ; end: isA161604 := proc(n) if ( n mod A030101(n) ) = 0 then true ; else false; fi; end: for n from 1 to 600 do if isA161604(n) then printf("%d, ", n) ; fi; od: # R. J. Mathar, Jun 18 2009
MATHEMATICA
Select[Range@ 153, Divisible[#, FromDigits[Reverse@ IntegerDigits[#, 2], 2]] &] (* Michael De Vlieger, Sep 04 2015 *)
PROG
(PARI) is(n, base=2) = my (r=fromdigits(Vecrev(digits(n, base)), base)); n%r==0 \\ Rémy Sigrist, Apr 04 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jun 14 2009
EXTENSIONS
Extended by R. J. Mathar, Jun 18 2009
STATUS
approved