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.

A308964 Least k > 0 such that A014222(k) == A014222(k+1) (mod n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 4, 1, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 4, 5, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 4, 2, 3, 3, 2, 3, 2, 3, 4, 3, 4, 2, 3, 2, 2, 3, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3
Offset: 1

Views

Author

Jinyuan Wang, Aug 30 2019

Keywords

Comments

a(n) is the least positive integer k such that the sequence {A014222(i) mod n} for i >= k is constant. Proof: if g(i) = A014222(i), then n divides 3^g(i-1)*(3^(g(i)-g(i-1)) - 1) when g(i) == g(i+1) (mod n). g(j)-g(j-1) divides g(j+1)-g(j) for any j > 0, therefore, 3^(g(i)-g(i-1)) - 1 divides 3^(g(i+1)-g(i)) - 1. Then n divides 3^g(i)*(3^(g(i+1)-g(i)) - 1) = g(i+2) - g(i+1), that is, g(i) == g(i+1) == g(i+2) (mod n). Since a(n) is the least positive integer k such that g(k) == g(k+1) (mod n), the sequence {A014222(i) mod n} for i >= k is constant.
A014222(k+1) - A014222(k) is the largest n such that a(n) = k.

Examples

			3, 27, 7625597484987, ... mod 5 equal 3, 2, 2, ..., so A014222(k) mod 5 = 2 for all k >= 2, hence a(5) = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(c=0, k=1, x=0, d=n); while(k==1, z=x++; y=0; b=1; while(z>0, while(y++
    				

Formula

a(n) <= A003434(n).
a(n) <= a(A000010(n)) + 1.