cp's OEIS Frontend

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.

A320535 Number of solutions to (x+1)^p - x^p == 1 (mod p^2) in the range 1 <= x <= p - 2, p = prime(n).

This page as a plain text file.
%I A320535 #18 Mar 19 2024 13:45:29
%S A320535 0,0,0,2,0,2,0,2,0,0,2,2,0,2,0,0,12,2,2,0,2,8,6,0,2,0,2,0,2,0,2,0,0,2,
%T A320535 0,2,2,2,0,0,6,2,0,8,0,2,2,2,6,2,0,0,2,0,0,0,0,2,2,0,2,0,2,0,2,0,2,8,
%U A320535 0,2,0,0,2,2,2,0,0,2,0,2,6,8,0,2,2,6,0
%N A320535 Number of solutions to (x+1)^p - x^p == 1 (mod p^2) in the range 1 <= x <= p - 2, p = prime(n).
%C A320535 For primes p > 2, (x+1)^p - x^p == 1 (mod p^2) has trivial solutions x == 0, -1 (mod p) so they are excluded.
%C A320535 Equivalently, a(n) is the number of solutions to x^(p-1) == (x+1)^(p-1) == 1 (mod p^2) in the range 1 <= x <= p^2 - 2, p = prime(n), that is, number of x such that both x and x + 1 occurs in the n-th row of A143548.
%C A320535 All terms shown here are even. The first odd terms are a(183) = 17 and a(490) = 5, with corresponding primes prime(183) = 1093 and prime(490) = 3511. a(n) is odd iff prime(n) is in A001220.
%C A320535 Let g be a primitive root modulo p^2, then (x+1)^p - x^p == 1 (mod p^2) has nontrivial solutions x == g^((p-1)/3) or g^(2*(p-1)/3) (mod p), and x^(p-1) == (x+1)^(p-1) == 1 (mod p^2) has nontrivial solutions x == g^(p*(p-1)/3) or g^(2*p*(p-1)/3) (mod p^2). As a result, if prime(n) == 1 (mod 6) then a(n) > 0. Primes p == 5 (mod 6) such that the equations have nontrivial solutions are listed in A068209.
%C A320535 a(17) = 12 is surprisingly large comparing with its nearby terms. Among the first 1000 terms there are only 7 that are larger than 12. They are a(183) = 17 and a(385) = a(552) = a(582) = a(593) = a(739) = a(922) = 14 (the corresponding primes are 1093, 2659, 4003, 4243, 4339, 5623 and 7213).
%H A320535 Robert Israel, <a href="/A320535/b320535.txt">Table of n, a(n) for n = 1..2500</a>
%e A320535 The nontrivial solutions to (x+1)^7 - x^7 == 1 (mod 49) are x == 2, 4 (mod 7); the solutions to x^6 == (x+1)^6 == 1 (mod 49) are x == 18, 30 (mod 49), so a(4) = 2.
%p A320535 f:= proc(n) local p; p:= ithprime(n);
%p A320535   nops(select(t -> (t+1)^p - t^p  mod p^2 = 1, [$1 .. p - 2]))
%p A320535 end proc:
%p A320535 map(f, [$1..100]); # _Robert Israel_, Mar 18 2024
%o A320535 (PARI) a(n) = my(p=prime(n)); sum(x=1, p-2, Mod(x+1, p^2)^p-Mod(x, p^2)^p==1);
%Y A320535 Cf. A001220, A068209, A143548.
%K A320535 nonn
%O A320535 1,4
%A A320535 _Jianing Song_, Oct 15 2018
%E A320535 Name corrected by _Robert Israel_, Mar 18 2024