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-3 of 3 results.

A052983 Least multiple of n consisting of a succession of 1's followed by a succession of 0's.

Original entry on oeis.org

10, 10, 1110, 100, 10, 1110, 1111110, 1000, 1111111110, 10, 110, 11100, 1111110, 1111110, 1110, 10000, 11111111111111110, 1111111110, 1111111111111111110, 100, 1111110, 110, 11111111111111111111110, 111000, 100, 1111110, 1111111111111111111111111110
Offset: 1

Views

Author

Lekraj Beedassy, Jun 26 2003

Keywords

Comments

All entries are differences of two terms of A000042. Since the pigeonhole principle guarantees that, for any m, two among the first m+1 entries of A000042 are congruent modulo m, their difference (i.e. belonging to this sequence) is therefore divisible by m, so that such numbers exist for all m. This sequence is thus infinite.
For n>1, a(n) consists of s 1's and t 0's, where s=A084681(X) and t is the greater of p or q (s=1 for X=1, t=1 for p=q=0), when we write n=X*Y with (X,Y)=1 and Y=2^p*5^q.

Examples

			We have a(6)=1110 because 6 divides 1110=6*185, the smallest such one with a string of 1's followed by that of 0's
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Select[ Map[ FromDigits, IntegerDigits[ Table[ Sum[2^i, {i, k, j, -1}], {j, k, 1, -1}], 2]]/n, IntegerQ[ # ] & ]; g[n_] := Block[{k = 1}, While[ f[n] == {}, k++ ]; n*Min[ f[n]]]; Table[ g[n], {n, 1, 27}]
    nn=30;With[{nos=Sort[Flatten[Table[FromDigits[Join[Table[1,{n}], Table[ 0,{i}]]],{n,nn},{i,5}]]]},Flatten[Table[Select[nos,Divisible[#,n]&,1],{n,nn}]]] (* Harvey P. Dale, Mar 09 2014 *)

Formula

a(n) = A276348(n) * n; A227362(a(n)) = 10. - Jaroslav Krizek, Aug 30 2016

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 26 2003

A190301 Smallest number h such that n*h is a repunit (A002275), or 0 if no such h exists.

Original entry on oeis.org

1, 0, 37, 0, 0, 0, 15873, 0, 12345679, 0, 1, 0, 8547, 0, 0, 0, 65359477124183, 0, 5847953216374269, 0, 5291, 0, 48309178743961352657, 0, 0, 0, 4115226337448559670781893, 0, 38314176245210727969348659, 0, 3584229390681, 0, 3367, 0, 0, 0, 3, 0, 2849, 0, 271, 0
Offset: 1

Views

Author

Jaroslav Krizek, May 07 2011

Keywords

Examples

			For n = 7: a(7) = 15873 because 7 * 15873 = 111111. Repunit 111111 is the smallest repunit with prime factor 7.
		

Crossrefs

Cf. A084681 (repunit length), A216479 (the repunit).
Cf. A050782 = the smallest number h such that n*h is palindromic number, A083117 = the smallest number h such that n*h is repdigit number.

Programs

  • Mathematica
    Table[If[GCD[n, 10] > 1, 0, k = MultiplicativeOrder[10, 9*n]; (10^k - 1)/(9*n)], {n, 100}] (* T. D. Noe, May 08 2011 *)
  • PARI
    a(n)=if(gcd(n,10)>1, 0, (10^znorder(Mod(10,9*n))-1)/9/n) \\ Charles R Greathouse IV, Aug 28 2016

A216479 a(n) is the least multiple of n which uses only the digit 1, or a(n) = -1 if no such multiple exists.

Original entry on oeis.org

1, -1, 111, -1, -1, -1, 111111, -1, 111111111, -1, 11, -1, 111111, -1, -1, -1, 1111111111111111, -1, 111111111111111111, -1, 111111, -1, 1111111111111111111111, -1, -1, -1, 111111111111111111111111111, -1, 1111111111111111111111111111, -1, 111111111111111, -1, 111111, -1, -1, -1, 111, -1, 111111, -1, 11111, -1
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Comments

a(n) = -1 if and only if n is a multiple of 2 or 5. See comment in A216485. - Chai Wah Wu, Jun 21 2015

Crossrefs

Cf. A084681 (number of 1's), A190301 (multiplier).

Programs

  • Mathematica
    Array[Which[GCD[#, 10] != 1, -1, Mod[#, 3] == 0, Block[{k = 1}, While[Mod[k, #] != 0, k = 10 k + 1]; k], True, (10^MultiplicativeOrder[10, #] - 1)/9] &, 42] (* Michael De Vlieger, Dec 11 2020 *)
  • Python
    def A216479(n):
        if n % 2 == 0 or n % 5 == 0:
            return -1
        rem = 1
        while rem % n != 0:
            rem = rem*10 + 1
        return rem
    # Azanul Haque, Nov 28 2020
Showing 1-3 of 3 results.