login
A082795
Smallest multiple of n beginning with 5.
8
5, 50, 51, 52, 5, 54, 56, 56, 54, 50, 55, 504, 52, 56, 510, 512, 51, 54, 57, 500, 504, 506, 506, 504, 50, 52, 54, 56, 58, 510, 527, 512, 528, 510, 525, 504, 518, 532, 507, 520, 533, 504, 516, 528, 540, 506, 517, 528, 539, 50, 51, 52, 53, 54
OFFSET
1,1
COMMENTS
a(n) is in {n, 2n, 3n, 4n, 5n, 6n, 7n, 8n, 9n, 11n, 12n, 13n, 14n, 15n, 16n, 17n, 21n, 22n, 23n, 24n, 25n, 31n, 32n, 33n, 34n, 41n, 42n}. [Charles R Greathouse IV, Mar 06 2011]
LINKS
MATHEMATICA
f[n_] := Block[{m = n}, While[ First@ IntegerDigits@ m != 5, m += n]; m]; Array[f, 54] (* Robert G. Wilson v *)
PROG
(PARI) a(n)=forstep(k=n, 42*n, n, if(Vec(Str(k))[1]=="5", return(k))) \\ Charles R Greathouse IV, Mar 06 2011
(Haskell)
a082795 n = until ((== 5) . a000030) (+ n) n
-- Reinhard Zumkeller, Mar 27 2012
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Apr 20 2003
EXTENSIONS
Corrected and extended by Sean A. Irvine, Mar 06 2011
STATUS
approved