login
A256572
Number of triples (x,x+1,x+2) with 1 < x <= p-3 of consecutive integers less than p whose product is 1 modulo p, where p = prime(n).
3
0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 0, 1, 3, 1, 1, 0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 3, 3, 0, 1, 1, 0, 0, 1, 3, 3, 1, 1, 0, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 1, 3, 0, 1, 3, 0, 1, 3, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 3, 1, 0, 3, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 3, 3, 0, 3, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 3, 1, 1, 3, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 3, 0, 3, 0, 1, 3, 1, 3, 0, 0, 0, 3, 1, 3, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 3, 3
OFFSET
1,9
COMMENTS
Is 23 the only prime with two triples?
LINKS
FORMULA
|T| where T={x|x*(x+1)*(x+2)==1 (mod p), p is prime, 1<x<=p-3}.
EXAMPLE
For p=7: 4*5*6==1 (mod 7); T={4}, |T|=1.
For p=23: 2*3*4==1 (mod 23) and 9*10*11==1 (mod 23); T={2,9}, |T|=2.
For p=59: 3*4*5==1 (mod 59), 12*13*14==1 (mod 59), and 41*42*43==1 (mod 59); T={3,12,41}, |T|=3.
PROG
(R)
library(numbers); IP <- vector(); t <- vector(); S <- vector(); IP <- c(Primes(1000)); LIP <- length(IP); for (j in 1:LIP){for (i in (3:(IP[j]-2))){t[i-1] <- as.vector(mod(((i-1)*i*(i+1)), IP[j]))}; S[j] <- length(which(t==1))}; S
#Needs a lot of memory. For Primes(100000), this takes a few hours.
(PARI) a(n) = {my(p = prime(n)); sum(x=2, p-3, (x*(x+1)*(x+2)) % p == 1); } \\ Michel Marcus, Apr 03 2015
CROSSREFS
Cf. A256567.
Sequence in context: A243067 A366092 A086965 * A025463 A327686 A274472
KEYWORD
nonn
AUTHOR
Marian Kraus, Apr 02 2015
STATUS
approved