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.
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, 19, 13, 6, 19, 19, 13, 8, 23, 6, 13, 23, 23, 8, 16, 11, 23, 16, 27, 11, 27, 8, 16, 27, 27, 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
Offset: 1
Keywords
Examples
A table for f(p^e): p e 2 3 5 7 11 13 1 1 1 1 1 1 1 2 1 1 1 1 1 1 3 3 1 1 1 1 1 4 3 4 1 1 1 1 5 3 4 1 1 1 1 6 3 4 6 1 1 1 7 7 7 6 1 1 1 8 7 7 6 8 1 1 9 7 7 6 8 1 1 10 7 7 6 8 1 1 11 11 7 11 8 1 1 12 11 7 11 8 12 1 13 11 13 11 8 12 1 14 11 13 11 8 12 14 15 11 13 11 15 12 14 16 11 16 16 15 12 14
Programs
-
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))))) 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 for(k=1, #L, my(p=factor(L[k])[1,1],e=factor(L[k])[1,2]); print1(b(p,e), ", "))
Formula
a(n) = f(A192135(n)), where f is defined in the comment section.
Comments