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 A256567 #39 Nov 27 2021 11:16:35 %S A256567 7,11,17,19,23,37,43,53,59,61,67,79,83,89,97,101,103,107,109,113,137, %T A256567 149,157,167,173,181,191,199,211,223,227,229,241,251,263,271,281,283, %U A256567 293,307,313,317,337,347,359,367,373,379,383,389,401,419,421,431,433,449 %N A256567 Primes p with the property that there are three consecutive integers (x,x+1,x+2) with 1 < x <= p-3 whose product is 1 modulo p. %C A256567 There may be one or more such triples, but 23 is the only prime up to 100000 having precisely two such triples. For the number of triples for each prime, see A256572. %C A256567 Together with 5, supersequence of A191065. - _Arkadiusz Wesolowski_, Nov 24 2021 %H A256567 Marian Kraus, <a href="/A256567/b256567.txt">Table of n, a(n) for n = 1..6390</a> %e A256567 For p=7: 4*5*6=120==1 (mod 7), so 7 is a term. %e A256567 For p=11: 5*6*7=210==1 (mod 11), so 11 is a term. %e A256567 For p=17: 4*5*6=120==1 (mod 17), so 17 is a term. %e A256567 13 is not a term because there is no such triple with product == 1 (mod 13). %o A256567 (R) %o A256567 library(numbers) %o A256567 IP <- vector() %o A256567 t <- vector() %o A256567 S <- vector() %o A256567 IP <- c(Primes(1000)) # Build a vector of all primes < 1000. %o A256567 for (j in 1:(length(IP))){ %o A256567 for (i in 3:(IP[j]-2)) %o A256567 t[i-1] <- as.vector(mod(((i-1)*i*(i+1)),IP[j])) %o A256567 S[j] <- length(which(t==1)) %o A256567 } %o A256567 IP[S!=0] %o A256567 #The loop checks for every triple for every prime, what it is modulo that prime. "IP[S!=0]" lists the primes that have at least one triple. For all p<10000 it takes a few minutes. For all p<100000 a few hours. %o A256567 (PARI) isok(p) = {if (isprime(p), for (x=1, p-3, if (Mod(x*(x+1)*(x+2), p) == 1, return (1));););} \\ _Michel Marcus_, Oct 05 2021 %Y A256567 Cf. A191065, A256572, A254678, A256580. %K A256567 nonn %O A256567 1,1 %A A256567 _Marian Kraus_, Apr 02 2015