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 30 results. Next

A053453 Duplicate of A002329.

Original entry on oeis.org

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

Views

Author

Keywords

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

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

Original entry on oeis.org

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

Views

Author

Lekraj Beedassy, Jun 30 2003

Keywords

Comments

When n is not divisible by 2 or 5, a(n) = A007732(n). A002329 contains the nonzero terms.
A number k > 0 appears in this sequence exactly A059892(k) times. - T. D. Noe, May 18 2007

Crossrefs

Programs

  • GAP
    List([1..100],n->OrderMod(10,n)); # Muniru A Asiru, Feb 26 2019
  • Maple
    A084680 := proc(n) if gcd(n,10) <> 1 then 0 ; elif n = 1 then 1 ; else numtheory[order](10,n) ; end if; end proc: seq(A084680(n),n=2..100) ; # R. J. Mathar, Mar 10 2010
  • Mathematica
    a[n_] := If[!CoprimeQ[n, 10], 0, MultiplicativeOrder[10, n]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 07 2012 *)
  • PARI
    a(n,b=10)=if(gcd(n,b)!=1,0,znorder(Mod(b,n)));
    vector(66,n,a(n)) \\ Joerg Arndt, Nov 15 2014
    

Extensions

More terms from John W. Layman, Aug 12 2003

A059907 a(n) = |{m : multiplicative order of n mod m = 2}|.

Original entry on oeis.org

0, 1, 2, 2, 5, 2, 6, 4, 6, 3, 12, 2, 10, 6, 8, 4, 13, 2, 18, 6, 10, 4, 16, 4, 12, 9, 12, 4, 26, 2, 20, 6, 8, 12, 20, 4, 15, 6, 16, 4, 32, 2, 24, 10, 10, 6, 20, 4, 26, 9, 18, 4, 26, 6, 32, 12, 12, 4, 28, 2, 20, 10, 12, 18, 25, 4, 24, 6, 26, 4, 52, 2, 18, 10, 12, 18, 26, 4, 40, 8, 14, 5, 28
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 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).

Examples

			a(2) = |{3}| = 1, a(3) = |{4,8}| = 2, a(4) = |{5,15}| = 2, a(5) = |{3,6,8,12,24}| = 5, a(6) = |{7,35}| = 2, a(7) = |{4,8,12,16,24,48}| = 6,...
		

Crossrefs

Programs

  • Maple
    with(numtheory):f := n->tau(n^2-1)-tau(n-1):for n from 1 to 100 do printf(`%d,`,f(n)) od:
  • Mathematica
    a[n_] := Subtract @@ DivisorSigma[0, {n^2-1, n-1}]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jan 25 2025 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^2-1) - numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^2-1)-tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A178505 Decimal form of the period of 1/n for n such that gcd(n,10)=1. Leading zeros are suppressed.

Original entry on oeis.org

3, 142857, 1, 9, 76923, 588235294117647, 52631578947368421, 47619, 434782608695652173913, 37, 344827586206896551724137931, 32258064516129, 3, 27, 25641, 2439, 23255813953488372093
Offset: 1

Views

Author

Michel Lagneau, May 29 2010

Keywords

Comments

The numbers n are A045572, and the corresponding periods are A002329.

Examples

			3 is in the sequence because 1/3 = 0.3333...
142857 is in the sequence because 1/7 = 0.142857 142857 ...
1 is in the sequence because 1/9 = 0.1111....
		

Crossrefs

Programs

  • Maple
    with(numtheory): nn:= 100: T:=array(1..nn):k:=1: U:=array(1..nn):k:=1: for n from 2 to 200 do:x:=1/n:for p from 1 to 200 while(irem(10^p,n)<>1 or gcd(n,10)<> 1) do:od: if irem(10^p,n) = 1 and gcd(n,10) = 1 then y:=floor(x*10^p): T[k]:=y: U[k]:=n : k:=k+1:else fi:od:print(T):

Formula

a(n) = A060284(A045572(n+1)). [R. J. Mathar, Jun 26 2010]

Extensions

Name corrected by T. D. Noe, Jul 07 2010

A059911 a(n) = |{m : multiplicative order of n mod m = 6}|.

Original entry on oeis.org

0, 3, 10, 16, 37, 10, 42, 24, 58, 53, 164, 26, 68, 38, 32, 68, 169, 22, 222, 38, 42, 50, 328, 40, 180, 219, 108, 26, 334, 82, 460, 82, 92, 72, 220, 108, 449, 86, 128, 80, 192, 22, 336, 110, 222, 218, 540, 84, 778, 129, 150, 80, 270, 54, 328, 356, 132, 68, 348, 22
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 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).

Examples

			a(2) = |{9,21,63}| = 3, a(3) = |{7,14,28,52,56,91,104,182,364,728}| = 10, a(4) = |{13,35,39,45,65,91,105,117,195,273,315,455,585,819,1365,4095}| = 16,...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[{1, -1, -1, 1} * DivisorSigma[0, n^{6, 3, 2, 1} - 1]]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jan 25 2025*)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^6-1) - numdiv(n^3-1) - numdiv(n^2-1) + numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^6-1)-tau(n^3-1)-tau(n^2-1)+tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A050975 Haupt-exponents of 3 modulo integers relatively prime to 3.

Original entry on oeis.org

1, 2, 4, 6, 2, 4, 5, 3, 6, 4, 16, 18, 4, 5, 11, 20, 3, 6, 28, 30, 8, 16, 12, 18, 18, 4, 8, 42, 10, 11, 23, 42, 20, 6, 52, 20, 6, 28, 29, 10, 30, 16, 12, 22, 16, 12, 35, 12, 18, 18, 30, 78, 4, 8, 41, 16, 42, 10, 88, 6, 22, 23, 36, 48, 42, 20, 100, 34, 6, 52, 53, 27, 20, 12
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A001651 := proc(n)
            (3*(2*n-1)-(-1)^n)/4 ;
    end proc:
    A050975 := proc(n)
            local gcd3 ;
            gcd3 := A001651(n+1);
            numtheory[order](3,gcd3) ;
    end proc: # R. J. Mathar, Oct 21 2012

A050977 Haupt-exponents of 5 modulo integers relatively prime to 5.

Original entry on oeis.org

1, 2, 1, 2, 6, 2, 6, 5, 2, 4, 6, 4, 16, 6, 9, 6, 5, 22, 2, 4, 18, 6, 14, 3, 8, 10, 16, 6, 36, 9, 4, 20, 6, 42, 5, 22, 46, 4, 42, 16, 4, 52, 18, 6, 18, 14, 29, 30, 3, 6, 16, 10, 22, 16, 22, 5, 6, 72, 36, 9, 30, 4, 39, 54, 20, 82, 6, 42, 14, 10, 44, 12, 22, 6, 46, 8, 96, 42, 30, 25, 16
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A002326 (base 2), A050975 (base 3), A002329.

Programs

  • Maple
    n := 1 :
    for i from 2 to 10000 do
        if igcd(i,5) = 1 then
            printf("%d %d\n",n,numtheory[order](5,i)) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Oct 14 2014

A059908 a(n) = |{m : multiplicative order of n mod m = 3}|.

Original entry on oeis.org

0, 1, 2, 4, 3, 2, 8, 2, 12, 5, 12, 2, 12, 2, 4, 20, 5, 6, 10, 2, 6, 14, 12, 2, 40, 9, 4, 6, 18, 10, 16, 6, 6, 8, 12, 12, 39, 2, 12, 8, 8, 6, 16, 6, 18, 26, 12, 6, 50, 3, 18, 8, 18, 2, 32, 12, 8, 20, 4, 6, 60, 2, 12, 26, 21, 4, 64, 10, 6, 8, 8, 6, 20, 14, 4, 12, 6, 4, 64, 2, 70, 7, 12, 6, 24
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 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).

Examples

			a(2) = |{7}| = 1, a(3) = |{13,26}| = 2, a(4) = |{7,9,21,63}| = 4, a(5) = |{31,62,124}| = 3, a(6) = |{43,215}| = 2, a(7) = |{9,18,19,38,57,114,171,342}| = 8,...
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0,n^3-1]-DivisorSigma[0,n-1],{n,90}] (* Harvey P. Dale, Feb 03 2015 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^3-1) - numdiv(n-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^3-1)-tau(n-1), where tau(n) = number of divisors of n A000005. Generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.

A059909 a(n) = |{m : multiplicative order of n mod m = 4}|.

Original entry on oeis.org

0, 2, 6, 4, 12, 4, 26, 18, 14, 6, 24, 12, 64, 8, 16, 8, 66, 20, 36, 8, 64, 24, 76, 6, 28, 12, 64, 24, 48, 12, 100, 40, 50, 48, 36, 8, 96, 40, 28, 8, 104, 12, 208, 36, 24, 36, 200, 18, 48, 36, 36, 24, 128, 8, 152, 16, 172, 24, 48, 12, 48, 36, 56, 72, 40, 8, 128, 56, 48, 40
Offset: 1

Views

Author

Vladeta Jovovic, Feb 08 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).

Examples

			a(2) = |{5, 15}| = 2, a(3) = |{5, 10, 16, 20, 40, 80}| = 6, a(4) = |{17, 51, 85, 255}| = 4, a(5) = |{13, 16, 26, 39, 48, 52, 78, 104, 156, 208, 312, 624}| = 12, ...
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0,n^4-1]-DivisorSigma[0,n^2-1],{n,70}] (* Harvey P. Dale, Nov 30 2011 *)
  • PARI
    a(n) = if(n == 1, 0, numdiv(n^4-1) - numdiv(n^2-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = tau(n^4-1)-tau(n^2-1), where tau(n) = number of divisors of n A000005. More generally, if b(n, r) = |{m : multiplicative order of n mod m = r}| then b(n, r) = Sum_{d|r} mu(d)*tau(n^(r/d)-1), where mu(n) = Moebius function A008683.
Showing 1-10 of 30 results. Next