%I #32 Oct 10 2016 23:48:10
%S 1,1,8,1,7,18,24,1,18,19,30,31,48,1,3,9,27,40,81,94,112,118,120,1,19,
%T 22,23,70,80,89,99,146,147,150,168,1,38,40,65,75,110,131,134,155,158,
%U 179,214,224,249,251,288,1,28,54,62,68,69,99,116,127,234,245,262,292,293,299,307,333,360
%N Irregular triangle of numbers k < p^2 such that p^2 divides k^(p-1)-1, with p=prime(n).
%C Row n begins with 1 and has prime(n)-1 terms. The first differences of each row are symmetric. For k > p^2, the solutions are just shifted by m*p^2 for m > 0. An open question is whether every integer appears in this sequence. For instance, 2 does not appear until the prime 1093 and 5 does not appear until the prime 20771.
%C For row n > 1, the sum of the terms in row n is (p-1)*p^2*(p+1)/2, which is A138416. - _T. D. Noe_, Aug 24 2008, corrected by _Robert Israel_, Sep 27 2016
%C _Max Alekseyev_ points out that there is a much faster method of computing these numbers. Let p=prime(n) and let r be a primitive root of p (see A001918 and A060749). Then the terms in row n are r^(k*p) (mod p^2) for k=0..p-2. - _T. D. Noe_, Aug 26 2008
%C The numbers in this sequence are the bases to Euler pseudoprimes q, which are squares of prime numbers, such that n^((q-1)/2) == +-1 mod q. An exception is the first number 9 = 3*3, which is, following the strict definition in Crandall and Pomerance, no Fermat pseudoprime and hence no Euler pseudoprime. - _Karsten Meyer_, Jan 08 2011
%C For row n > 1, the sum is zero modulo p^2 (rows are antisymmetric due to Binomial Theorem). - _Peter A. Lawrence_, Sep 11 2016
%D R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2005
%H T. D. Noe, <a href="/A143548/b143548.txt">Rows n=1..50 of triangle, flattened</a>
%e (2) 1,
%e (3) 1, 8,
%e (5) 1, 7, 18, 24,
%e (7) 1, 18, 19, 30, 31, 48,
%e (11) 1, 3, 9, 27, 40, 81, 94, 112, 118, 120,
%e (13) 1, 19, 22, 23, 70, 80, 89, 99, 146, 147, 150, 168,
%e (17) 1, 38, 40, 65, 75, 110, 131, 134, 155, 158, 179, 214, 224, 249, 251, 288,
%p f:= proc(n) local p,j,x;
%p p:= ithprime(n);
%p x:= numtheory:-primroot(p);
%p op(sort([seq(x^(i*p) mod p^2, i=0..p-2)]))
%p end proc:
%p map(f, [$1..20]); # _Robert Israel_, Sep 27 2016
%t Flatten[Table[p=Prime[n]; Select[Range[p^2], PowerMod[ #,p-1,p^2]==1&], {n,50}]] (* _T. D. Noe_, Aug 24 2008 *)
%t Flatten[Table[p=Prime[n]; r=PrimitiveRoot[p]; b=PowerMod[r,p,p^2]; Sort[NestList[Mod[b*#,p^2]&,1,p-2]], {n,50}]] (* Faster version from _T. D. Noe_, Aug 26 2008 *)
%Y Cf. A039678, A056020, A056021, A056022, A056024, A056025, A056027, A056028, A056031, A056034, A056035, A096082, A138416.
%K nonn,tabf
%O 1,3
%A _T. D. Noe_, Aug 24 2008
|