A082798 Smallest multiple of n beginning with 8.
8, 8, 81, 8, 80, 84, 84, 8, 81, 80, 88, 84, 806, 84, 810, 80, 85, 810, 817, 80, 84, 88, 805, 816, 800, 806, 81, 84, 87, 810, 806, 800, 825, 816, 805, 828, 814, 836, 819, 80, 82, 84, 86, 88, 810, 828, 846, 816, 833, 800, 816, 832, 848, 810, 825, 840, 855, 812
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a082798 n = until ((== 8) . a000030) (+ n) n -- Reinhard Zumkeller, Mar 27 2012
-
Mathematica
f[n_] := Block[{m = n}, While[ First@ IntegerDigits@ m != 8, m += n]; m]; Array[f, 55] (* Robert G. Wilson v *)
-
PARI
a(n)=forstep(k=n, 72*n, n, if(Vec(Str(k))[1]=="8", return(k))) \\ Charles R Greathouse IV, Mar 06 2011
-
Python
def a(n): m = n while str(m)[0] != '8': m += n return m print([a(n) for n in range(1, 59)]) # Michael S. Branicky, Aug 08 2021
Extensions
Corrected and extended by Sean A. Irvine, Mar 06 2011
Comments