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.
%I A254678 #43 Jul 02 2019 17:11:58 %S A254678 7,17,23,31,41,47,73,89,97,103,127,137,151,167,199,223,233,239,241, %T A254678 257,271,281,311,313,353,359,367,383,409,431,433,439,449,479,487,503, %U A254678 521,577,593,601,607,647,673,719,727,743,751,761,769,839,857,881,887,911,929,937,953,967,977,983 %N A254678 Primes p with the property that there are four consecutive integers less than p whose product is 1 mod p. %H A254678 Harvey P. Dale, <a href="/A254678/b254678.txt">Table of n, a(n) for n = 1..1000</a> %F A254678 x*(x+1)*(x+2)*(x+3) == 1 mod p, p is prime, 1 <= x <= p-4. %e A254678 p=7: 2*3*4*5=120 == 1 mod 7; %e A254678 p=17: 2*3*4*5=120 == 1 mod 17 AND 12*13*14*15=32760 == 1 mod 17; for p=13: no triple == 1 mod 13; %e A254678 p=23: 5*6*7*8 == 1 mod 23 AND 15*16*17*18== 1 mod 23 AND 19*20*21*22 == 1 mod 23; and so on. For the number of quadruples for a prime, see A256580. %t A254678 fsiQ[n_]:=AnyTrue[Times@@@Partition[Range[n-1],4,1],Mod[#,n]==1&]; Select[ Prime[Range[200]],fsiQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 02 2019 *) %o A254678 (R) %o A254678 library(numbers) %o A254678 IP <- vector() %o A254678 t <- vector() %o A254678 S <- vector() %o A254678 IP <- c(Primes(1000)) %o A254678 for (j in 1:(length(IP))){ %o A254678 for (i in 2:(IP[j]-4)){ %o A254678 t[i-1] <- as.vector(mod((i*(i+1)*(i+2)*(i+3)),IP[j])) %o A254678 Z[j] <- sum(which(t==1)) %o A254678 S[j] <- length(which(t==1)) %o A254678 } %o A254678 } %o A254678 IP[S!=0] %o A254678 #Carefully increase Primes(1000). It takes several hours for 100000. %o A254678 (PARI) lista(nn) = forprime(p=2, nn, if (sum(x=1, p-4, ((x*(x+1)*(x+2)*(x+3)) % p) == 1) > 0, print1(p, ", "))); \\ _Michel Marcus_, Apr 03 2015 %Y A254678 Cf. A256567, A256580. %K A254678 nonn %O A254678 1,1 %A A254678 _Marian Kraus_, Apr 02 2015