OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
The leading (most significant) digit of 22/7 in A068028 is 3, so a(22)=3.
MAPLE
A255873 := proc(n)
local nshf ;
nshf := n/7 ;
while nshf < 1 do
nshf := 10*nshf;
end do;
while nshf >= 10 do
nshf := nshf/10;
end do;
floor(nshf) ;
end proc: # R. J. Mathar, May 28 2016
MATHEMATICA
f[n_] := RealDigits[n/7, 10, 9][[1, 1]]; Array[f, 105] (* Robert G. Wilson v, Mar 08 2015 *)
PROG
(PARI) a(n) = {my(x = n/7.0); if (x < 1, x *= 10); while (x >= 10, x /= 10); floor(x); } \\ Michel Marcus, Mar 12 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Kit Scriven, Mar 08 2015
STATUS
approved