OFFSET
1,1
EXAMPLE
a(4) = 13 as floor(13*Pi) = 40 while floor(12*Pi) = 37.
MAPLE
C := Pi; a := proc(M0, M, C) local i, d, f, g, k; description "returns the sequence 'a(n)' between 'M0' and 'M' where 'a(n)=min{k | floor(C*k) begins with n}."; d := N->`if`(N=0, [0], ListTools[Reverse](convert(N, base, 10))); f := (K, N)->`if`(d(floor(K*C))[1..min(nops(d(floor(K*C))), nops(d(N)))]=d(N), K, 0); for i from M0 to M do k := 0; while f(k, i)=0 do k := k+1; od; g(i) := f(k, i) od; return seq(g(j), j=M0..M); end proc;
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 22 2002
EXTENSIONS
More terms from Francois Jooste (pin(AT)myway.com), Mar 10 2003
STATUS
approved