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.

A256517 Let c be the n-th composite number. Then a(n) is the smallest base b > 1 such that b^(c-1) == 1 (mod c^2), i.e., such that c is a 'Wieferich pseudoprime'.

Original entry on oeis.org

17, 37, 65, 80, 101, 145, 197, 26, 257, 325, 401, 197, 485, 577, 182, 677, 728, 177, 901, 1025, 485, 1157, 99, 1297, 1445, 170, 1601, 1765, 1937, 82, 2117, 2305, 1047, 2501, 577, 529, 2917, 1451, 3137, 721, 3365, 3601, 3845, 244, 4097, 99, 1945, 4625, 530
Offset: 1

Views

Author

Felix Fröhlich, Apr 01 2015

Keywords

Crossrefs

Programs

  • Mathematica
    c = Select[Range@ 69, CompositeQ]; f[c_] := Block[{b = 2}, While[Mod[b^(c - 1), c^2] != 1, b++]; b]; f /@ c (* Michael De Vlieger, Apr 03 2015 *)
  • PARI
    forcomposite(c=1, 1e3, b=2; while(Mod(b, c^2)^(c-1)!=1, b++); print1(b, ", "))
    
  • Python
    from sympy import composite
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A256517(n):
        z = nthroot_mod(1,(c := composite(n))-1,c**2,True)
        return int(z[0]+c**2 if len(z) == 1 else z[1]) # Chai Wah Wu, May 18 2022

Formula

a(n) = A185103(A002808(n)-1). - Bill McEachen, Nov 27 2021