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-10 of 11 results. Next

A059892 a(n) = |{m : multiplicative order of 10 mod m is equal to n}|.

Original entry on oeis.org

3, 3, 5, 6, 9, 53, 9, 36, 12, 33, 9, 186, 21, 33, 111, 144, 9, 564, 3, 330, 239, 273, 3, 1756, 84, 165, 76, 714, 93, 16167, 21, 5952, 111, 177, 363, 4288, 21, 15, 99, 5724, 45, 48807, 45, 4314, 1140, 183, 9, 14192, 36, 2940, 495, 1338, 45, 11572, 747, 11484
Offset: 1

Views

Author

Vladeta Jovovic, Feb 06 2001

Keywords

Comments

The multiplicative order of a mod m, gcd(a,m)=1, is the smallest natural number d for which a^d = 1 (mod m).
The number of unit fractions 1/k having a decimal expansion of period n and with k coprime to 10. - T. D. Noe, May 18 2007
Also, number of primitive factors of 10^n - 1 (cf. A003060). - Max Alekseyev, May 03 2022
a(n) is odd if and only if n is squarefree. Proof: Note that 10^d - 1 == 3 (mod 4) for d >= 2, so 10^d - 1 is a square if and only if d = 1. From the formula we can see that a(n) is odd if and only if mu(n) is nonzero, or n is squarefree. - Jianing Song, Jun 15 2021

Crossrefs

Number of primitive factors of b^n - 1: A059499 (b=2), A059885(b=3), A059886 (b=4), A059887 (b=5), A059888 (b=6), A059889 (b=7), A059890 (b=8), A059891 (b=9), this sequence (b=10).
Column k=10 of A212957.

Programs

  • Maple
    with(numtheory):
    a:= n-> add(mobius(n/d)*tau(10^d-1), d=divisors(n)):
    seq(a(n), n=1..30);  # Alois P. Heinz, Oct 12 2012
  • Mathematica
    f[n_, d_] := MoebiusMu[n/d]*Length[Divisors[10^d - 1]]; a[n_] := Total[(f[n, #] & ) /@ Divisors[n]]; Table[a[n], {n, 1, 56}] (* Jean-François Alcover, Mar 21 2011 *)
  • PARI
    j=[]; for(n=1,10,j=concat(j,sumdiv(n,d,moebius(n/d)*numdiv(10^d-1)))); j
    
  • Python
    from sympy import divisors, mobius, divisor_count
    def a(n): return sum(mobius(n//d)*divisor_count(10**d - 1) for d in divisors(n)) # Indranil Ghosh, Apr 23 2017

Formula

a(n) = Sum_{d|n} mu(n/d)*tau(10^d-1), (mu(n) = Moebius function A008683, tau(n) = number of divisors of n A000005).

Extensions

More terms from Jason Earls, Aug 06 2001.
Terms to a(280) in b-file from T. D. Noe, Oct 01 2013
a(281)-a(322) in b-file from Ray Chandler, May 03 2017
a(323)-a(352) in b-file from Max Alekseyev, May 03 2022

A070528 Number of divisors of 10^n-1 (999...999 with n digits).

Original entry on oeis.org

3, 6, 8, 12, 12, 64, 12, 48, 20, 48, 12, 256, 24, 48, 128, 192, 12, 640, 6, 384, 256, 288, 6, 2048, 96, 192, 96, 768, 96, 16384, 24, 6144, 128, 192, 384, 5120, 24, 24, 128, 6144, 48, 49152, 48, 4608, 1280, 192, 12, 16384, 48, 3072, 512, 1536, 48, 12288, 768
Offset: 1

Views

Author

Henry Bottomley, May 02 2002

Keywords

Examples

			a(7)=12 since the divisors of 9999999 are 1, 3, 9, 239, 717, 2151, 4649, 13947, 41841, 1111111, 3333333, 9999999.
		

Crossrefs

Programs

  • Mathematica
    DivisorSigma[0,#]&/@(10^Range[60]-1) (* Harvey P. Dale, Jan 14 2011 *)
    Table[DivisorSigma[0, 10^n - 1], {n, 60}] (* T. D. Noe, Aug 18 2011 *)
  • PARI
    a(n) = numdiv(10^n - 1); \\ Michel Marcus, Sep 08 2015

Formula

a(n) = A000005(A002283(n)).
a(n) = Sum_{d|n} A059892(d).
a(n) = A070529(n)*(A007949(n)+3)/(A007949(n)+1).

Extensions

Terms to a(280) in b-file from Hans Havermann, Aug 19 2011
a(281)-a(322) in b-file from Ray Chandler, Apr 22 2017
a(323)-a(352) in b-file from Max Alekseyev, May 04 2022

A085035 Number of prime factors of cyclotomic(n,10), which is A019328(n), the value of the n-th cyclotomic polynomial evaluated at x=10.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jun 19 2003

Keywords

Comments

The Mobius transform of this sequence yields A057951, number of prime factors of 10^n-1.

References

Crossrefs

omega(Phi(n,x)): A085021 (x=2), A085028 (x=3), A085029 (x=4), A085030 (x=5), A085031 (x=6), A085032 (x=7), A085033 (x=8), A085034 (x=9), this sequence (x=10).

Programs

  • Mathematica
    Table[Plus@@Transpose[FactorInteger[Cyclotomic[n, 10]]][[2]], {n, 1, 100}]

Formula

a(n) = A001222(A019328(n)). - Ray Chandler, May 10 2017

A212953 Minimal order of degree-n irreducible polynomials over GF(2).

Original entry on oeis.org

1, 3, 7, 5, 31, 9, 127, 17, 73, 11, 23, 13, 8191, 43, 151, 257, 131071, 19, 524287, 25, 49, 69, 47, 119, 601, 2731, 262657, 29, 233, 77, 2147483647, 65537, 161, 43691, 71, 37, 223, 174763, 79, 187, 13367, 147, 431, 115, 631, 141, 2351, 97, 4432676798593, 251
Offset: 1

Views

Author

Alois P. Heinz, Jun 01 2012

Keywords

Comments

a(n) = smallest odd m such that A002326((m-1)/2) = n. - Thomas Ordowski, Feb 04 2014
For n > 1; n < a(n) < 2^n, wherein a(n) = n+1 iff n+1 is A001122 a prime with primitive root 2, or a(n) = 2^n-1 iff n is a Mersenne exponent A000043. - Thomas Ordowski, Feb 08 2014

Examples

			For n=4 the degree-4 irreducible polynomials p over GF(2) are 1+x+x^2+x^3+x^4, 1+x+x^4, 1+x^3+x^4. Their orders (i.e., the smallest integer e for which p divides x^e+1) are 5, 15, 15. (Example: (1+x+x^2+x^3+x^4) * (1+x) == x^5+1 (mod 2)). Thus the minimal order is 5 and a(4) = 5.
		

References

  • W. Narkiewicz, Elementary and Analytic Theory of Algebraic Numbers, Springer 2004, Third Edition, 4.3 Factorization of Prime Ideals in Extensions. More About the Class Group (Theorem 4.33), 4.4 Notes to Chapter 4 (Theorem 4.40). - Regarding the first comment.

Crossrefs

Programs

  • Maple
    with(numtheory):
    M:= proc(n) option remember;
          divisors(2^n-1) minus U(n-1)
        end:
    U:= proc(n) option remember;
          `if`(n=0, {}, M(n) union U(n-1))
        end:
    a:= n-> min(M(n)[]):
    seq(a(n), n=1..50);
  • Mathematica
    M[n_] := M[n] = Divisors[2^n-1] ~Complement~ U[n-1];
    U[n_] := U[n] = If[n == 0, {}, M[n] ~Union~ U[n-1]];
    a[n_] := Min[M[n]];
    Array[a, 50] (* Jean-François Alcover, Mar 22 2017, translated from Maple *)

Formula

a(n) = min(M(n)) with M(n) = {d : d|(2^n-1)} \ U(n-1) and U(n) = M(n) union U(n-1) for n>0, U(0) = {}.
a(n) = A059912(n,1) = A213224(n,1).

A170945 Least number k such that the decimal representation of 1/k has period Fibonacci(n).

Original entry on oeis.org

3, 11, 27, 41, 73, 53, 43, 103, 1321, 497867, 323, 467, 11311, 20141, 12169, 232159532264041847249
Offset: 2

Views

Author

Michel Lagneau, Feb 19 2010

Keywords

Comments

The period of 1/k is the least integer p such that 10^p = 1 (mod k). The integer p is also known as the multiplicative order of 10 (mod k).

Examples

			p(k) is the period of 1/k, we obtain with k=3,11,27,41,73,53,43,103 p(3)=1,p(11)=2,p(27)=3,p(41)=5,p(73)=8, p(53)=13,p(43)=21, p(103)=34
		

References

  • Mohammad K. Azarian, The Generating Function for the Fibonacci Sequence, Missouri Journal of Mathematical Sciences, Vol. 2, No. 2, Spring 1990, pp. 78-79. Zentralblatt MATH, Zbl 1097.11516.
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Cf. A000045, A039834 (signed Fibonacci numbers), A002329, A072859 (periodic sequences), A003060

Programs

  • Maple
    For the great numbers (p > 70), the maple program is very slow. That's what we use an process of two steps: factoring 10^p-1 with elliptic curve method (see the first web site), and then, for each factor q(k), k=1,2,...,r computation the periods of 1/q(k) and keep the period q(i) such that q(i) = Fibonacci number. The 17th term required 3h 2m for the computing of (10^1597) -1 T:=array(0..100);U:=array(0..100); n0:=0:n1:=1:T[1] = 1:for i from 2 to 30 do: n2:=n0+n1:T[i]:=n2:n0:=n1:n1:=n2:od:U[1]:=3:U[2]:=3:for q from 3 to 10 do: p0:=T[q]: indic:=0:for n from 1 to 2000 do:for p from 1 to 150 while(irem(10^p,n)<>1 or gcd(n,10)<>1 ) do:od: if irem(10^p,n) = 1 and gcd(n,10) = 1 and p=p0 and indic=0 then U[q]:=n:indic:=1:else fi:od: od: for n from 1 to 10 do:print( U[n]):od:

Extensions

Edited by T. D. Noe, Apr 14 2010

A291943 a(0)=0; for n>0, a(n) = (2n)-th digit after the decimal point in the decimal expansion of 1/(2n+1).

Original entry on oeis.org

0, 3, 0, 7, 1, 9, 3, 6, 7, 1, 4, 3, 0, 3, 1, 9, 3, 5, 7, 2, 9, 3, 2, 7, 8, 1, 3, 1, 1, 1, 9, 1, 3, 7, 1, 9, 3, 3, 9, 1, 7, 3, 7, 1, 1, 9, 1, 5, 7, 1, 9, 3, 0, 7, 1, 0, 3, 6, 0, 0, 8, 0, 0, 7, 0, 9, 8, 0, 7, 1, 0, 9, 8, 4, 1, 9, 4, 4, 7, 0, 6, 3, 0, 7, 3, 5, 3, 4, 0, 1, 9, 0, 4, 5, 0, 9, 3, 0, 7, 1
Offset: 0

Views

Author

Marco Matosic, Sep 06 2017

Keywords

Examples

			a(3)=7 since we want the sixth decimal digit of 1/7.
		

References

  • John H. Conway & Richard K. Guy, The Book of Numbers; Springer 1996.

Crossrefs

Programs

  • Maple
    f:= proc(n) floor(10^(2*n)/(2*n+1)) mod 10 end proc:
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Oct 31 2017
  • Mathematica
    f[n_] := Mod[Floor[10^(2n)/(2n +1)], 10]; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Oct 31 2017 *)

Extensions

Edited by N. J. A. Sloane, Oct 30 2017
a(82) corrected by Robert Israel, Oct 31 2017

A381370 Smallest number with reciprocal of period length n in base 9.

Original entry on oeis.org

1, 2, 5, 7, 32, 11, 35, 547, 17, 19, 25, 23, 224, 398581, 29, 31, 128, 103, 95, 1597, 352, 43, 115, 47, 97, 151, 53, 109, 928, 59, 155, 683, 256, 161, 515, 71, 608, 18427, 7985, 79, 187, 83, 203, 431, 89, 181, 235, 1223, 896, 491, 101
Offset: 0

Views

Author

Erich Friedman, Feb 25 2025

Keywords

Comments

For n > 1, a(n) is the smallest positive d such that d divides 9^n - 1 and does not divide any of 9^k - 1 for 0 < k < n.

Examples

			a(3)=7 because 1/7 has period 3 in base 9 (.125125125...) and no smaller number has this property.
		

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.

Crossrefs

Programs

  • Mathematica
    a[n_] := First[Select[Divisors[9^n - 1], MultiplicativeOrder[9, #] == n &, 1]];
    a[0] = 1; a[1] = 2; Table[a[n], {n, 0, 50}]
  • Python
    from sympy import divisors
    def A381370(n): return next(d for d in divisors(9**n-1) if d>1 and all(pow(9,k,d)!=1 for k in range(1,n))) if n else 1 # Chai Wah Wu, Feb 28 2025

A381493 Smallest number with reciprocal of period length n in base 8.

Original entry on oeis.org

1, 7, 3, 73, 5, 31, 19, 49, 17, 262657, 11, 23, 37, 79, 43, 631, 97, 103, 81, 32377, 25, 3577, 67, 47, 323, 601, 237, 2593, 29, 233, 209, 2147483647, 193, 199, 307, 71, 405, 223, 571, 937, 187, 13367, 817, 431, 115, 271, 139, 2351, 577, 343, 251
Offset: 0

Views

Author

Erich Friedman, Feb 25 2025

Keywords

Comments

For n > 1, a(n) is the smallest positive d such that d divides 8^n - 1 and does not divide any of 8^k - 1 for 0 < k < n.

Examples

			a(3)=73 because 1/73 has period 3 in base 8 (.007007007...) and no smaller number has this property.
		

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.

Crossrefs

Programs

  • Mathematica
    a[n_] := First[Select[Divisors[8^n - 1], MultiplicativeOrder[8, #] == n &, 1]];
    a[0] = 1; a[1] = 7; Table[a[n], {n, 0, 50}]
  • Python
    from sympy import divisors
    def A381493(n):
        if n == 0: return 1
        for d in divisors(8**n-1):
            if d>1 and all(pow(8,k,d)!=1 for k in range(1,n)):
                return d # Chai Wah Wu, Feb 28 2025

A381494 Smallest number with reciprocal of period length n in base 7.

Original entry on oeis.org

1, 2, 4, 9, 5, 2801, 36, 29, 64, 27, 11, 1123, 13, 16148168401, 113, 31, 17, 14009, 108, 419, 55, 261, 23, 47, 73, 2551, 53, 81, 145, 59, 99, 311, 256, 3631, 56036, 81229, 135, 223, 1676, 486643, 41, 83, 1017, 166003607842448777, 115, 837, 188, 13722816749522711, 153, 3529, 10204
Offset: 0

Views

Author

Erich Friedman, Feb 25 2025

Keywords

Comments

For n > 1, a(n) is the smallest positive d such that d divides 7^n - 1 and does not divide any of 7^k - 1 for 0 < k < n.

Examples

			a(3)=9 since 1/9 has period 3 in base 7 (.053053053...) and no smaller number has this property.
		

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.

Crossrefs

Programs

  • Maple
    f:= proc(n) local d,k;
          for d in sort(convert(numtheory:-divisors(7^n-1),list)) do
            if andmap(k -> 7^k-1 mod d <> 0, [$1 .. n-1]) then return d fi
          od
    end proc:
    f(0):= 1: f(1):= 2:
    map(f, [$0..80]); # Robert Israel, Feb 28 2025
  • Mathematica
    a[n_] := First[Select[Divisors[7^n - 1], MultiplicativeOrder[7, #] == n &, 1]];
    a[0] = 1; a[1] = 2; Table[a[n], {n, 0, 50}]
  • Python
    from sympy import divisors
    def A381494(n): return next(d for d in divisors(7**n-1) if d>1 and all(pow(7,k,d)!=1 for k in range(1,n))) if n else 1 # Chai Wah Wu, Feb 28 2025

Formula

Conjecture: a(n) = A218358(n) for n>=2. - R. J. Mathar, Mar 03 2025

A176351 Numbers n such that 2*3^n + 1 is a primitive prime factor of 10^3^n - 1.

Original entry on oeis.org

4, 180, 320, 5480, 12096, 17720, 82780, 1175232
Offset: 1

Views

Author

T. D. Noe, Apr 15 2010

Keywords

Comments

Consider the problem of finding the smallest number k such that the decimal representation of 1/k has period 3^e for a given e. The number k is usually 3^(e+2). However, if e is one of the n in this sequence, then the prime 2*3^n+1 is a smaller k. The first instance of these exceptions is 1/163, which has a period of 81.
Subsequence of A003306.
10 must be a square residue modulo 2*3^n + 1, implying that n must be a multiple of 4.

Crossrefs

Cf. A003306 (primes of the form 2*3^n+1), A003060 (least k such that 1/k has period n).

Programs

  • Mathematica
    Select[Range[10000], PrimeQ[1+2*3^# ] && MultiplicativeOrder[10,1+2*3^# ] == 3^# &]

Extensions

Two more terms from Max Alekseyev, May 03 2010
Showing 1-10 of 11 results. Next