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.

A099679 Least m such that repunit R_m is a multiple of A045572(n) (i.e., odd numbers not divisible by 5).

Original entry on oeis.org

1, 3, 6, 9, 2, 6, 16, 18, 6, 22, 27, 28, 15, 6, 3, 6, 5, 21, 46, 42, 48, 13, 18, 58, 60, 18, 33, 66, 35, 8, 6, 13, 81, 41, 84, 44, 6, 15, 96, 18, 4, 34, 53, 108, 3, 112, 18, 48, 22, 15, 42, 21, 130, 18, 8, 46, 138, 6, 42, 148, 75, 144, 78, 39, 66, 81, 166, 78, 18, 43, 174, 178
Offset: 1

Views

Author

Lekraj Beedassy, Oct 26 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ Mod[(10^k - 1)/9, n] != 0, k++ ]; k]; f /@ Select[ 2Range[ 90] - 1, Mod[ #, 5] != 0 &] (* Robert G. Wilson v, Oct 27 2004 *)
  • PARI
    A(n)={ \\ Least m such that n | R_m
        my(f=factor(n),s=1,t);
        for(i=1,#f[,1],
            if(f[i,1]==3,
                t=3
            ,
                t=Mod(10,9*f[i,1]);
                fordiv(f[i,1]-1,d,
                    if(t^d==1,t=d;break)
                )
            );
            t*=f[i,1]^(f[i,2]-1);
            s=lcm(s,t)
        );
        s
    };
    a(n)=A(10*(n>>2)+[-1, 1, 3, 7][n%4+1]) \\ Least m such that A045572(n) | R_m
    \\ Charles R Greathouse IV, Jul 31 2011

Extensions

Corrected and extended by Robert G. Wilson v, Oct 27 2004