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-1 of 1 results.

A270360 Least positive integer k such that 5^n-1 and k^n-1 are relatively prime.

Original entry on oeis.org

2, 6, 2, 6, 2, 42, 2, 6, 2, 132, 2, 546, 2, 12, 6, 102, 2, 798, 2, 198, 2, 138, 2, 546, 2, 6, 2, 348, 2, 85932, 2, 102, 2, 12, 22, 383838, 2, 12, 6, 2706, 2, 1806, 2, 414, 22, 282, 2, 9282, 2, 264, 2, 318, 2, 1596, 2, 348, 2, 354, 2, 34072038
Offset: 1

Views

Author

Tom Edgar, Mar 16 2016

Keywords

Comments

Note that (5^n-1)^n-1 is always relatively prime to 5^n-1.
Based on conjecture given in A270390, a(n) = 2 infinitely often.
Are all terms even? - Harvey P. Dale, Jul 29 2024

Examples

			Since 5^2-1 = 24 and 6^2-1 = 35 are relatively prime while 2^2-1, 3^2-1, 4^2-1, and 5^2-1 are not relatively prime to 24, a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    lpi[n_]:=Module[{k=1,c=5^n-1},While[!CoprimeQ[c,k^n-1],k++];k]; Array[lpi,60] (* Harvey P. Dale, Jul 29 2024 *)
  • PARI
    a(n) = {k=1; while( gcd(5^n-1, k^n-1)!=1, k++); k; }
  • Sage
    def min_k(n):
        g, k=2, 0
        while g!=1:
            k=k+1
            g=gcd(5^n-1, k^n-1)
        return k
    print([min_k(n) for n in [1..60]])
    

Extensions

a(60) from Harvey P. Dale, Jul 29 2024
Showing 1-1 of 1 results.