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.

A308972 Least k > 0 such that A114561(k) == A114561(k+1) mod n.

This page as a plain text file.
%I A308972 #11 Oct 17 2019 14:28:02
%S A308972 1,1,1,1,2,1,1,2,1,2,3,1,2,1,2,2,2,1,2,2,1,3,4,2,3,2,2,1,2,2,3,2,3,2,
%T A308972 2,1,2,2,2,2,3,1,2,3,2,4,5,2,2,3,2,2,3,2,3,2,2,2,3,2,3,3,1,2,2,3,4,2,
%U A308972 4,2,3,2,2,2,3,2,3,2,3,2,3,3,4,1,2,2,2
%N A308972 Least k > 0 such that A114561(k) == A114561(k+1) mod n.
%C A308972 A114561(k+1) - A114561(k) is the largest n such that a(n) = k.
%F A308972 a(n) <= A003434(n).
%F A308972 a(n) <= a(A000010(n)) + 1. Proof: a(n) <= a(eulerphi(n)) + 1. Proof: If A114561(i) == b(i) mod eulerphi(n), 0 < b(i) <= eulerphi(n), then a(n) is the least k > 0 such that 2^b(k-1) == 2^b(k) mod n. Since A114561(a(eulerphi(n))) == A114561(a(eulerphi(n)) + 1), k <= a(A000010(n)) + 1.
%e A308972 4, 4^4, 4^4^4, ... mod 8 equal 4, 0, 0, ..., so A114561(k) mod 8 = 0 for all k >= 2, hence a(8) = 2.
%o A308972 (PARI) a(n) = {c=0; k=1; x=0; d=n; while(k==1, z=x++; y=0; b=1; while(z>0, while(y++<z, d=eulerphi(d)); b=4^b-floor((4^b-1)/d)*d; z=z-1; y=0; d=n); if(c==b, k=0); c=b); x-1; }
%Y A308972 Cf. A114561, A308964, A322418.
%K A308972 nonn
%O A308972 1,5
%A A308972 _Jinyuan Wang_, Aug 30 2019