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.

A254329 Numbers n such that all x^2 mod n are prime powers (including 0 and 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 16, 20, 32
Offset: 1

Views

Author

Joerg Arndt, Jan 28 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Mod[Range[n]^2, n]; Select[Range@ 10000, AllTrue[f@ #, Length@ FactorInteger[#] == 1 &] &] (* AllTrue function introduced with Version 10; Michael De Vlieger, Jan 29 2015 *)
  • PARI
    is(n)=for(i=2,9,if(!isprimepower(i^2%n) && i^2%n>1, return(0))); 1 \\ Charles R Greathouse IV, Jan 30 2015