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.

A328914 Smallest index m such that from the m-th term on, the sequence {k^k mod A192135(n): k >= 0} enters into a cycle.

This page as a plain text file.
%I A328914 #56 Nov 28 2020 09:13:46
%S A328914 3,3,3,3,4,7,4,7,7,4,7,11,7,11,7,11,6,11,7,15,7,15,6,15,7,15,6,19,7,
%T A328914 19,13,6,19,19,13,8,23,6,13,23,23,8,16,11,23,16,27,11,27,8,16,27,27,
%U A328914 16,11,8,31,16,31,11,31,16,8,31,11,22,35,35,22,8,35,16,35,22,39,8,16,25,39,39,25,12,16,39,15,25,43
%N A328914 Smallest index m such that from the m-th term on, the sequence {k^k mod A192135(n): k >= 0} enters into a cycle.
%C A328914 Let f(n) be the smallest index m such that from the m-th term on, the sequence {k^k mod n: k >= 0} enters into a cycle, then:
%C A328914 (a) if gcd(n1,n2) = 1, then f(n1*n2) = max{f(n1), f(n2)}. For example, f(648) = max{f(8), f(81)} = 4;
%C A328914 (b) f(1) = 0; for primes p, f(p^e) = 1 if e <= p; f(p^e) is the largest s that is no greater than e and that s-1 is divisible by p but not by p^2.
%C A328914 Proof: If we define b(k) = k^k mod p^e if gcd(k,p) = 1, 0 otherwise, it is easy to see that {b(k): k >= 0} is purely periodic. As a result, for every k >= f(p^e), we have either gcd(k,p) = 1 or  p^e | k^k. In other words, let t be the largest number divisible by p such that p^e does not divide t^t, then f(p^e) = t+1.
%C A328914 If p^2 divides t, write t = r*p^2, then v(t^t,p) < v((t+p)^(t+p),p), where t(,p) is the p-adic valuation. This gives r = 0. As a result, f(p^e) is either 1 or a number s such that s-1 is divisible by p but not by p^2. In the latter case, v((s-1)^(s-1),p) = s-1, so s is the largest such number that is no greater than e.
%C A328914 The records in this sequence are {3, 4, 7, 11, 15, 19, 23, ...}
%F A328914 a(n) = f(A192135(n)), where f is defined in the comment section.
%e A328914 A table for f(p^e):
%e A328914               p
%e A328914    e  2  3  5  7 11 13
%e A328914    1  1  1  1  1  1  1
%e A328914    2  1  1  1  1  1  1
%e A328914    3  3  1  1  1  1  1
%e A328914    4  3  4  1  1  1  1
%e A328914    5  3  4  1  1  1  1
%e A328914    6  3  4  6  1  1  1
%e A328914    7  7  7  6  1  1  1
%e A328914    8  7  7  6  8  1  1
%e A328914    9  7  7  6  8  1  1
%e A328914   10  7  7  6  8  1  1
%e A328914   11 11  7 11  8  1  1
%e A328914   12 11  7 11  8 12  1
%e A328914   13 11 13 11  8 12  1
%e A328914   14 11 13 11  8 12 14
%e A328914   15 11 13 11 15 12 14
%e A328914   16 11 16 16 15 12 14
%o A328914 (PARI) b(p,e) = if(!e, 0, if(e<=p, 1, forstep(k=e, p+1, -1, if(k%p==1&&k%(p^2)!=1, return(k)))))
%o A328914 L=List(); my(lim=12); forprime(p=2, lim, for(n=p+1, lim*log(lim)\log(p), listput(L, p^n))); listsort(L); L \\ generates all terms of A192135 below lim^lim
%o A328914 for(k=1, #L, my(p=factor(L[k])[1,1],e=factor(L[k])[1,2]); print1(b(p,e), ", "))
%Y A328914 Cf. A192135, A328920 (smallest N such that f(N) = n).
%K A328914 nonn
%O A328914 1,1
%A A328914 _Jianing Song_, Oct 31 2019