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 A256572 #29 Apr 06 2015 04:21:10 %S A256572 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, %T A256572 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, %U A256572 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 %N 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). %C A256572 Is 23 the only prime with two triples? %H A256572 Marian Kraus, <a href="/A256572/b256572.txt">Table of n, a(n) for n = 1..9592</a> %F A256572 |T| where T={x|x*(x+1)*(x+2)==1 (mod p), p is prime, 1<x<=p-3}. %e A256572 For p=7: 4*5*6==1 (mod 7); T={4}, |T|=1. %e A256572 For p=23: 2*3*4==1 (mod 23) and 9*10*11==1 (mod 23); T={2,9}, |T|=2. %e A256572 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. %o A256572 (R) %o A256572 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 %o A256572 #Needs a lot of memory. For Primes(100000), this takes a few hours. %o A256572 (PARI) a(n) = {my(p = prime(n)); sum(x=2, p-3, (x*(x+1)*(x+2)) % p == 1);} \\ _Michel Marcus_, Apr 03 2015 %Y A256572 Cf. A256567. %K A256572 nonn %O A256572 1,9 %A A256572 _Marian Kraus_, Apr 02 2015