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.

A268081 Least positive integer k such that 3^n-1 and k^n-1 are relatively prime.

This page as a plain text file.
%I A268081 #22 Nov 20 2024 17:47:02
%S A268081 2,2,2,10,2,28,2,10,2,22,10,910,2,2,2,170,2,3458,2,110,2,46,10,910,2,
%T A268081 2,2,290,2,9548,2,340,10,2,22,639730,2,2,2,4510,2,1204,10,230,2,94,2,
%U A268081 216580,2,22,2,530,2,3458,22,580,2,118,2,18928910
%N A268081 Least positive integer k such that 3^n-1 and k^n-1 are relatively prime.
%C A268081 Note that (3^n-1)^n-1 is always relatively prime to 3^n-1.
%C A268081 According to the conjecture given in A086892, a(n) = 2 infinitely often.
%C A268081 When n>1, a(n) = 2 if and only if A260119(n) = 3.
%C A268081 From _Robert Israel_, Nov 20 2024: (Start)
%C A268081   a(n) <= a(m*n) for m >= 1.
%C A268081   If p is a prime factor of 3^n - 1 such that p-1 divides n, then a(n) is a multiple of p. (End)
%H A268081 Robert Israel, <a href="/A268081/b268081.txt">Table of n, a(n) for n = 1..10000</a>
%e A268081 Since 3^5-1 = 242 and 2^5-1 = 31 are relatively prime, a(5) = 2.
%p A268081 f:= proc(n) local t,F,m,k,v;
%p A268081        t:= 3^n-1;
%p A268081        F:= select(isprime,map(`+`,numtheory:-divisors(n),1));
%p A268081        m:= convert(select(s -> t mod s = 0, F),`*`);
%p A268081        for k from m by m do
%p A268081              v:= k &^ n - 1 mod t;
%p A268081              if igcd(v, t) = 1 then return k fi
%p A268081        od
%p A268081     end proc:
%p A268081 map(f, [$1..100]); # _Robert Israel_, Nov 20 2024
%t A268081 Table[k = 1; While[! CoprimeQ[3^n - 1, k^n - 1], k++]; k, {n, 59}] (* _Michael De Vlieger_, Jan 27 2016 *)
%o A268081 (Sage)
%o A268081 def min_k(n):
%o A268081     g, k=2, 0
%o A268081     while g!=1:
%o A268081         k=k+1
%o A268081         g=gcd(3^n-1, k^n-1)
%o A268081     return k
%o A268081 print([min_k(n) for n in [1..60]])
%o A268081 (PARI) a(n) = {k=1; while( gcd(3^n-1, k^n-1)!=1, k++); k; }
%Y A268081 Cf. A086892, A260119.
%K A268081 nonn
%O A268081 1,1
%A A268081 _Tom Edgar_, Jan 25 2016