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.

A349748 Primes p for which 2^p-1 and 5^p-1 are not relatively prime.

Original entry on oeis.org

2, 179, 239, 359, 419, 431, 499, 547, 571, 641, 659, 719, 761, 937, 1013, 1019, 1223, 1439, 1499, 1559, 1789, 2039, 2339, 2399, 2459, 2539, 2593, 2677, 2699, 2819, 2939, 3299, 3359, 3539, 3779, 4013, 4019, 4273, 4513, 4787, 4919, 5039, 5279, 5393, 5399, 5639, 6173, 6199, 6899, 7079, 8599, 8741, 8929, 9059, 9419, 9479
Offset: 1

Views

Author

Antti Karttunen, Nov 30 2021

Keywords

Comments

Primes p for which A270390(p) = gcd(A000225(p), A024049(p)) > 1.

Examples

			2 is included as 2^2 - 1 = 3 and 5^2 - 1 = 24 share a prime factor 3.
		

Crossrefs

Programs

  • Mathematica
    upto=10^4;Select[Prime[Range[PrimePi[upto]]],GCD[2^#-1,5^#-1]>1&] (* Paolo Xausa, Nov 30 2021 *)
  • PARI
    isA349748(n) = (isprime(n)&&(gcd(2^n-1,5^n-1)>1));
    
  • Python
    from math import gcd
    from sympy import isprime
    def ok(n): return isprime(n) and gcd(2**n-1, 5**n-1) > 1
    print([k for k in range(9500) if ok(k)]) # Michael S. Branicky, Nov 30 2021

A265166 Numbers n such that 2^n-1 and 5^n-1 are coprime.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 27, 29, 31, 33, 37, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 77, 79, 81, 83, 85, 87, 89, 91, 93, 97, 101, 103, 107, 109, 111, 113, 115, 121, 123, 125, 127, 129, 131, 133, 137, 139, 141, 143
Offset: 1

Views

Author

Vincenzo Librandi, May 01 2016

Keywords

Comments

Also numbers n such that A270390(n) = 1.
Conjectured to be infinite: see the Ailon and Rudnick paper.

Examples

			gcd(2^1-1, 5^1-1) = gcd(1,4) = 1, so a(1) = 1.
gcd(2^3-1, 5^3-1) = gcd(7,124) = 1, so a(2) = 3.
gcd(2^4-1, 5^4-1) = gcd(15,624) = 3, so 4 is not in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..200] | Gcd(2^n-1,5^n-1) eq 1];
  • Mathematica
    Select[Range[200], GCD[2^# - 1, 5^# - 1] == 1 &]
    Select[Range[150],CoprimeQ[2^#-1,5^#-1]&] (* Harvey P. Dale, Apr 12 2018 *)

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