A291460 Even numbers m whose decimal expansion contains the decimal expansion of the greatest odd divisor of m as a substring.
16, 128, 384, 512, 1024, 1536, 1792, 2176, 2560, 2912, 3072, 5120, 7168, 8192, 9216, 11264, 13312, 15360, 15616, 16384, 17408, 19456, 21504, 23552, 25600, 27648, 28672, 29696, 31744, 33792, 35840, 37376, 37888, 39936, 41984, 43392, 57344, 66560, 90112, 98304
Offset: 1
Examples
The greatest odd divisor of 1792 = 2^8*7 is 7, which is in 1(7)92. Therefore, 1792 is in this sequence. 2^10*x = 1024*x contains x as a substring for all x from 1 to 41. Therefore, 1024*x is in this sequence for all odd x from 1 to 41.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..1567 (terms < 10^20)
Programs
-
Mathematica
inQ[n_] := StringPosition[ToString[n], ToString[n/2^IntegerExponent[n, 2]]] != {}; Select[2 Range[50000], inQ] (* Giovanni Resta, Aug 24 2017 and slightly modified by Robert G. Wilson v, Aug 25 2017 *)
-
PARI
is(n)=if(n%2, return(0)); my(r=n>>valuation(n, 2), m=Mod(r, 10^#digits(r))); while(n>=r, if(n==m, return(1)); n\=10); 0 \\ Charles R Greathouse IV, Aug 26 2017
-
Python
A291460_list = [2*x for x in range(1,10**6) if str(int(bin(x).rstrip('0'),2)) in str(2*x)] # Chai Wah Wu, Aug 31 2017
Extensions
More terms from Giovanni Resta, Aug 24 2017
Name edited by Felix Fröhlich, Aug 24 2017
Comments