OFFSET
1,1
EXAMPLE
The largest square dividing 17 is 1. However, 17 in binary is 10001; and the largest square occurring, in its binary representation, within 10001 is 4 (100 in binary). Since 1 does not equal 4, then 17 is in this sequence.
MAPLE
From R. J. Mathar, Aug 31 2010: (Start)
A008833 := proc(n) local b; b := floor(sqrt(n)) ; while b >= 1 do if n mod (b^2) = 0 then return b^2 ; end if; b := b-1 ; end do: end proc:
A162400 := proc(n) local b, nbin, a; a := 1 ; nbin := convert(n, base, 2) ; for b from 1 to floor(sqrt(n)) do convert(b^2, base, 2) ; if verify(%, nbin, 'sublist') then a := b^2 ; end if; end do: a ; end proc:
for n from 1 to 300 do if isA162400(n) then printf("%d, ", n) ; end if; end do: (End)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Apr 24 2010
EXTENSIONS
More terms from R. J. Mathar, Aug 31 2010
STATUS
approved