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.

Showing 1-2 of 2 results.

A190302 Smallest number h such that the decimal expansion of n*h starts with 1.

Original entry on oeis.org

1, 5, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Jaroslav Krizek, May 07 2011

Keywords

Comments

Quotient of the smallest multiple of n beginning with 1 (A187285(n)) and n.
Conjecture: a(n) < 6 for all n (verified to n = 10022141). - Felix Fröhlich, Jul 28 2018

Examples

			For n = 7: a(7) = 2 because 2 * 7 = 14. Number 14 is the smallest number beginning with 1 divisible by 7.
		

Crossrefs

Cf. A187285.

Programs

  • Maple
    A190302 := proc(n) local d,h: for h from 1 do d:=convert(n*h,base,10): if(d[nops(d)]=1)then return h: fi: od: end: seq(A190302(n), n=1..105); # Nathaniel Johnston, Jun 15 2011
  • PARI
    a(n) = my(h=1, inid=0); while(1, my(inid=digits(n*h)[1]); if(inid==1, return(h)); h++) \\ Felix Fröhlich, Jul 28 2018

Formula

a(n) = A187285(n) / n.

A317180 a(n) is the least positive multiple of n that contains at least one digit 1 in its decimal representation.

Original entry on oeis.org

1, 10, 12, 12, 10, 12, 14, 16, 18, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100, 21, 110, 115, 120, 100, 104, 81, 112, 116, 120, 31, 128, 132, 102, 105, 108, 111, 114, 117, 120, 41, 126, 129, 132, 135, 138, 141, 144, 147, 100, 51, 104, 106, 108, 110, 112, 114
Offset: 1

Views

Author

Rémy Sigrist, Jul 23 2018

Keywords

Examples

			The multiples of 3 are: 3, 6, 9, 12, 15, etc.; 12 is the first one containing the digit 1, hence a(3) = 12.
		

Crossrefs

Programs

  • Mathematica
    on1[n_]:=Module[{k=1},While[DigitCount[k*n,10,1]<1,k++];k*n]; Array[on1,60] (* Harvey P. Dale, Apr 09 2022 *)
  • PARI
    a(n) = forstep (m=n, oo, n, if (setsearch(Set(digits(m)), 1), return (m)))

Formula

a(n) = n * A317173(n).
a(n) <= A187285(n).

Extensions

Definition clarified by Harvey P. Dale, Apr 09 2022
Showing 1-2 of 2 results.