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.

A053446 Multiplicative order of 3 mod m, where gcd(m, 3) = 1.

Original entry on oeis.org

1, 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, 112, 44
Offset: 1

Views

Author

Keywords

Comments

Essentially the same as A050975. - R. J. Mathar, Oct 13 2008
Let k, m be any positive numbers not divisible by 3. Let k <+> m denote that of the two numbers k + m, k + 2*m which is divisible by 3. Finally, for a number t divisible by 3, let t* = t/3^s where s is the 3-adic order of t. Let u = u(n) be the n-th number which is not divisible by 3. Consider the following algorithm of the calculating a(n), similar to the algorithm in A002326: Compute successively r_1 = (1 <+> u)*, r_2 = (r_1 <+> u)*, ..., r_h = (r_(h-1) <+> u)* and finish as soon as r_h = 1. Then a(n) = s(1 <+> u) + s(r_1 <+> u) + ... + s(r_(h-1) <+> u). Note that by a similar algorithm one can compute an arbitrary multiplicative order of a mod b, where gcd(a, b) = 1. - Vladimir Shevelev, Oct 06 2017

Examples

			From _Vladimir Shevelev_, Oct 06 2017: (Start)
7 is the fifth number not divisible by 3. According to the algorithm in the comment we have in the form of a "finite continued fraction"
    1 + 14
    ------ + 7
       3
    ---------- + 14
          3
    ----------------- + 7
            3^2
    ---------------------- = 1
               3^2
Summing the exponents of 3 in the denominators, we obtain a(5) = 1 + 1 + 2 + 2 = 6. (End)
		

Crossrefs

Programs

  • GAP
    List(Filtered([1..130],n->Gcd(n,3)=1),n->OrderMod(3,n)); # Muniru A Asiru, Feb 26 2019
  • Mathematica
    MultiplicativeOrder[3, #] & /@ Select[ Range@ 115, GCD[3, #] == 1 &] (* Robert G. Wilson v, Apr 05 2011 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (gcd(n,3) == 1, print1(znorder(Mod(3, n)), ", ")););} \\ Michel Marcus, Feb 06 2015
    
  • Sage
    [Mod(3,n).multiplicative_order() for n in (1..115) if gcd(n,3) == 1] # Peter Luschny, Oct 07 2017
    

Formula

a(n) = multiplicative order of 3 modulo floor((3*n-1)/2) = A001651(n), for n >= 1. - Wolfdieter Lang, Sep 28 2020

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

A297363 Numbers k such that (3^ord(3, k) - 1)/k is prime, where ord(3, k) is the multiplicative order of 3 (mod k).

Original entry on oeis.org

1, 4, 13, 16, 22, 40, 46, 56, 94, 104, 121, 160, 364, 526, 862, 968, 1093, 1312, 1514, 3146, 3194, 3280, 3742, 4376, 5368, 7280, 7702, 8744, 9841, 28418, 29524, 40880, 69022, 75920, 88573, 106288, 157394
Offset: 1

Views

Author

Amiram Eldar, Dec 29 2017

Keywords

Comments

The corresponding primes are 2, 2, 2, 5, 11, 2, 3851, 13, 1001523179, 7, 2, 41, 2, 605199588591144003100881306574406851660288427740394885828171, ...

Examples

			46 is in the sequence since ord(3, 46) = 11 and (3^11 - 1)/46 = 3851 is prime.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_] := PrimeQ[(3^MultiplicativeOrder[3, n] - 1)/n]; Select[ Range[10000], aQ ]
  • PARI
    isok(n) = (gcd(n,3) == 1) && isprime((3^znorder(Mod(3, n)) - 1)/n); \\ Michel Marcus, Dec 30 2017
Showing 1-3 of 3 results.