OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
x*(x+1)*(x+2)*(x+3) == 1 mod p, p is prime, 1 <= x <= p-4.
EXAMPLE
p=7: 2*3*4*5=120 == 1 mod 7;
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;
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.
MATHEMATICA
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 *)
PROG
(R)
library(numbers)
IP <- vector()
t <- vector()
S <- vector()
IP <- c(Primes(1000))
for (j in 1:(length(IP))){
for (i in 2:(IP[j]-4)){
t[i-1] <- as.vector(mod((i*(i+1)*(i+2)*(i+3)), IP[j]))
Z[j] <- sum(which(t==1))
S[j] <- length(which(t==1))
}
}
IP[S!=0]
#Carefully increase Primes(1000). It takes several hours for 100000.
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Marian Kraus, Apr 02 2015
STATUS
approved