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.

A273339 Smallest composite c such that n^(c-1) != 1 (mod c^2), i.e., smallest composite c that is not a "Wieferich pseudoprime" to base n.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4
Offset: 2

Views

Author

Felix Fröhlich, May 20 2016

Keywords

Comments

Smallest composite c such that n does not occur in row c of the array in A244752. - Felix Fröhlich, Jan 07 2017
Conjecture: periodic with period = 16. - Harvey P. Dale, May 12 2025
For any set S of composite numbers, if n is a composite == 1 (mod lcm(S)^2) then n^(c-1) == 1 (mod c^2) for all c in S, so a(n) is not in S. Thus the sequence has infinitely many distinct members, and in particular the conjecture is false. - Robert Israel, Aug 15 2025

Crossrefs

Programs

  • Maple
    f:= proc(n) local c;
      for c from 4 do
        if not isprime(c) and n &^(c-1) mod (c^2) <> 1 then return c fi
      od
    end proc:
    map(f, [$2..100]); # Robert Israel, Aug 15 2025
  • Mathematica
    A273339[n_] := NestWhile[#+1 &, 4, PrimeQ[#] || PowerMod[n, #-1, #^2] == 1 &];
    Array[A273339, 100, 2] (* Paolo Xausa, Aug 15 2025 *)
  • PARI
    a(n) = forcomposite(c=1, , if(Mod(n, c^2)^(c-1)!=1, return(c)))