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.

A285931 Number of primes q < p such that q^(p-1) == 1 (modulo p^2), where p = prime(n).

This page as a plain text file.
%I A285931 #22 May 18 2017 13:17:17
%S A285931 0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,0,1,0,
%T A285931 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,
%U A285931 0,2,0,2,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
%N A285931 Number of primes q < p such that q^(p-1) == 1 (modulo p^2), where p = prime(n).
%C A285931 Pairs of prime numbers (q, p) satisfying the conditions in the definition are sometimes called "Wieferich prime pairs" (cf. Mossinghoff, 2009).
%C A285931 a(n) > 0 iff p is a term of A222184.
%C A285931 First occurrence of k beginning at 0: 1, 5, 70, 1618, 2702, etc. - _Robert G. Wilson v_, May 10 2017
%H A285931 M. J. Mossinghoff, <a href="https://doi.org/10.1007/s10623-009-9301-3">Wieferich pairs and Barker sequences</a>, Designs, Codes and Cryptography, Vol. 53, No. 3 (2009), 149-163.
%e A285931 For n = 70: prime(70) = 349 and there are two primes q < 349 such that q^(349-1) == 1 (modulo 349^2), namely 223 and 317, so a(70) = 2.
%t A285931 f[n_] := Block[{c = 0, p = Prime@ n, q = 2}, While[q < p, If[ PowerMod[q, p - 1, p^2] == 1, c++]; q = NextPrime@q]; c]; Array[f, 105] (* _Robert G. Wilson v_, May 10 2017 *)
%o A285931 (PARI) a(n) = my(p=prime(n), i=0); forprime(q=1, p-1, if(Mod(q, p^2)^(p-1)==1, i++)); i
%Y A285931 Cf. A222184, A222206 (records).
%K A285931 nonn
%O A285931 1,70
%A A285931 _Felix Fröhlich_, Apr 30 2017