OFFSET
1,1
COMMENTS
First digit of n must be 1,2 or 3. - Robert Israel, Aug 18 2014
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (n = 1..407 from Edward Jiang)
EXAMPLE
15 is a member as floor(51/15) = 3.
MAPLE
revdigs:= proc(n) local L, nL, k;
L:= convert(n, base, 10);
nL:= nops(L);
add(L[i]*10^(nL-i), i=1..nL);
end proc;
select(n -> floor(revdigs(n)/n)=3, [$1..10^4]); # Robert Israel, Aug 18 2014
MATHEMATICA
a079832Q[n_Integer] := If[
Floor[FromDigits[Reverse[IntegerDigits[n]]]/n] == 3, True, False
]; a079832[n_Integer] := Select[Range[n], Mod[#, 10] != 0 && a079832Q[#] &]; a079832[1100] (* Michael De Vlieger, Aug 17 2014 *)
PROG
(ARIBAS) for n := 1 to 1100 do nst := ""; st := itoa(n); for i := 0 to length(st) - 1 do nst := concat(st[i], nst); end; a := atoi(nst); if a div n = 3 then write(n, ", ") end; end;
(PARI) for(n=1, 1100, if(floor(eval(concat(Vecrev(Str(n))))/n)==3, print1(n, ", "))) \\ Edward Jiang, Aug 16 2014
(Python)
from math import floor
for i in range(1, 1100):
....if floor(int(str(i)[::-1])/i)==3:
........print(i)
# Edward Jiang, Aug 16 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Feb 11 2003
EXTENSIONS
Edited and extended by Klaus Brockhaus, Feb 12 2003
STATUS
approved