login
A079832
Numbers n such that floor(reverse(n)/n) = 3.
2
15, 16, 29, 104, 114, 124, 134, 135, 144, 145, 155, 165, 166, 175, 176, 185, 186, 195, 196, 207, 208, 217, 218, 227, 228, 237, 238, 239, 247, 248, 249, 258, 259, 268, 269, 278, 279, 288, 289, 299, 1004, 1013, 1023, 1033, 1043, 1053, 1063, 1073, 1083, 1093
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
Cf. A079831.
Sequence in context: A377160 A046417 A193566 * A037971 A022105 A041456
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Feb 11 2003
EXTENSIONS
Edited and extended by Klaus Brockhaus, Feb 12 2003
STATUS
approved