cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A082792 Smallest multiple of n beginning with 3.

Original entry on oeis.org

3, 30, 3, 32, 30, 30, 35, 32, 36, 30, 33, 36, 39, 308, 30, 32, 34, 36, 38, 300, 315, 308, 322, 312, 300, 312, 324, 308, 319, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 320, 328, 336, 301, 308, 315, 322, 329, 336, 343, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354
Offset: 1

Views

Author

Amarnath Murthy, Apr 20 2003

Keywords

Comments

a(n) is in {n, 2n, 3n, 4n, 5n, 6n, 7n, 8n, 11n, 12n, 13n, 14n, 15n, 21n, 22n, 23n}. - Charles R Greathouse IV, Mar 06 2011

Crossrefs

Programs

  • Haskell
    a082792 n = until ((== 3) . a000030) (+ n) n
    -- Reinhard Zumkeller, Mar 27 2012
    
  • Mathematica
    f[n_] := Block[{m = n}, While[ First@ IntegerDigits@ m != 3, m += n]; m]; Array[f, 59] (* Robert G. Wilson v, Mar 06 2011 *)
  • PARI
    a(n)=forstep(k=n,23*n,n,if(Vec(Str(k))[1]=="3",return(k))) \\ Charles R Greathouse IV, Mar 06 2011
    
  • Python
    def a(n):
      kn = n
      while str(kn)[0] != '3': kn += n
      return kn
    print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Mar 30 2021

Extensions

Corrected and extended by Sean A. Irvine, Mar 06 2011