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.

A196202 a(n) = 2^(prime(n)-1) mod prime(n)^2.

Original entry on oeis.org

2, 4, 16, 15, 56, 40, 222, 58, 392, 30, 187, 38, 944, 1076, 2069, 1909, 473, 2197, 671, 143, 4089, 1502, 3985, 535, 5530, 9293, 6078, 1392, 7304, 9380, 2287, 2228, 7262, 4171, 14305, 8457, 12875, 10922, 7850, 520, 8951, 26789, 9551, 20073, 34476, 26866
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 29 2011

Keywords

Comments

a(A049084(A001220(1))) = a(A049084(A001220(2))) = 1.

Examples

			A001220(1)=1093=A000040(183): a(183)=1, or a(A049084(A001220(1)))=1;
A001220(2)=3511=A000040(490): a(490)=1, or a(A049084(A001220(2)))=1.
		

References

  • N. G. W. H. Beeger, On a new case of the congruence 2^(p-1) ≡ 1 (p^2), Messenger of Mathematics 51, (1922), p. 149-150
  • Paulo Ribenboim, 1093 (Chap 8), in 'My Numbers, My Friends', Springer-Verlag 2000 NY, page 213ff.

Crossrefs

Cf. A061286.

Programs

  • Haskell
    import Math.NumberTheory.Moduli (powerMod)
    a196202 n = powerMod 2 (p - 1) (p ^ 2) where p = a000040 n
    -- Reinhard Zumkeller, May 18 2015
  • Maple
    seq(2 &^ (ithprime(n)-1) mod ithprime(n)^2, n=1..1000); # Robert Israel, Aug 03 2014
  • Mathematica
    PowerMod[2,#-1,#^2]&/@Prime[Range[50]] (* Harvey P. Dale, Apr 25 2012 *)
  • PARI
    forprime(p=2, 1e2, print1(lift(Mod(2, p^2)^(p-1)), ", ")) \\ Felix Fröhlich, Aug 03 2014