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.

A255920 Number of primes p with p < n such that n^(p-1) == 1 (mod p^2) i.e., number of Wieferich primes to base n less than n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 2, 2, 3, 0, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 0, 1, 0, 2, 1, 0, 2, 2, 1, 1, 1, 1, 1, 0, 1, 2, 1, 2, 0, 3, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 2, 0, 2, 3, 2, 1, 2, 0, 2, 1, 2, 2, 1, 1, 1, 3, 2, 2, 0, 0, 1, 0, 0, 0
Offset: 2

Views

Author

Felix Fröhlich, Mar 11 2015

Keywords

Crossrefs

Cf. A242830.

Programs

  • Mathematica
    f[n_] := Block[{p = Complement[Prime@ Range@ PrimePi@ n, First /@ FactorInteger@ n]}, Select[p, Divisible[n^(# - 1) - 1, #^2] &]]; Length /@ Table[f@ n, {n, 2, 120}] (* Michael De Vlieger, Sep 24 2015 *)
  • PARI
    for(n=2, 120, i=0; forprime(p=1, n, if(Mod(n, p^2)^(p-1)==1, i++)); print1(i, ", "))