login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285931 Number of primes q < p such that q^(p-1) == 1 (modulo p^2), where p = prime(n). 0
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,70
COMMENTS
Pairs of prime numbers (q, p) satisfying the conditions in the definition are sometimes called "Wieferich prime pairs" (cf. Mossinghoff, 2009).
a(n) > 0 iff p is a term of A222184.
First occurrence of k beginning at 0: 1, 5, 70, 1618, 2702, etc. - Robert G. Wilson v, May 10 2017
LINKS
M. J. Mossinghoff, Wieferich pairs and Barker sequences, Designs, Codes and Cryptography, Vol. 53, No. 3 (2009), 149-163.
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(PARI) a(n) = my(p=prime(n), i=0); forprime(q=1, p-1, if(Mod(q, p^2)^(p-1)==1, i++)); i
CROSSREFS
Cf. A222184, A222206 (records).
Sequence in context: A270882 A278778 A356817 * A069845 A091397 A119818
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Apr 30 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)