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.

A084681 Order of 10 modulo 9n [i.e., least m such that 10^m = 1 (mod 9n)] or 0 when no such number exists.

Original entry on oeis.org

1, 0, 3, 0, 0, 0, 6, 0, 9, 0, 2, 0, 6, 0, 0, 0, 16, 0, 18, 0, 6, 0, 22, 0, 0, 0, 27, 0, 28, 0, 15, 0, 6, 0, 0, 0, 3, 0, 6, 0, 5, 0, 21, 0, 0, 0, 46, 0, 42, 0, 48, 0, 13, 0, 0, 0, 18, 0, 58, 0, 60, 0, 18, 0, 0, 0, 33, 0, 66, 0, 35, 0, 8, 0, 0, 0, 6, 0, 13, 0, 81, 0, 41, 0, 0, 0, 84, 0, 44, 0, 6, 0, 15, 0
Offset: 1

Views

Author

Lekraj Beedassy, Jun 30 2003

Keywords

Crossrefs

Programs

  • GAP
    List([1..100],n->OrderMod(10,9*n)); # Muniru A Asiru, Feb 26 2019
  • Maple
    f:= proc(n)
    if igcd(n,10)>1 then 0 else numtheory:-order(10,9*n) fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 22 2019
  • Mathematica
    a[n_] := If[GCD[10, 9n] != 1, 0, MultiplicativeOrder[10, 9n]];
    Array[a, 100] (* Jean-François Alcover, Jul 19 2020 *)
  • PARI
    a(n) = if (gcd(10, 9*n) != 1, 0, znorder(Mod(10, 9*n))); \\ Michel Marcus, Feb 23 2019
    

Formula

From Robert Israel, Feb 22 2019: (Start)
a(n) = A084680(9*n).
If n is not divisible by 3, a(n) = A084680(n).
Otherwise a(n) can be either A084680(n), 3*A084680(n) or 9*A084680(n). (End)

Extensions

More terms from John W. Layman, Oct 09 2003

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

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 11 2012

Keywords

Crossrefs

A bisection of A190301.

Programs

  • Mathematica
    Table[If[GCD[n, 10] > 1, 0, k = MultiplicativeOrder[10, 9*n]; (10^k - 1)/(9*n)], {n, 1, 51, 2}] (* T. D. Noe, Sep 11 2012 *)
Showing 1-3 of 3 results.