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 A376691 #19 Oct 02 2024 16:09:40 %S A376691 1,3,3,5,3,10,3,7,5,10,3,16,3,10,10,7,3,18,3,16,10,10,3,24,7,10,5,16, %T A376691 3,36,3,11,10,10,10,28,3,10,10,24,3,36,3,16,18,10,3,24,9,26,10,16,3, %U A376691 18,10,24,10,10,3,56,3,10,18,11,10,36,3,16,10,36 %N A376691 The number of solutions to x + y == x^2 + y^2 == x^3 + y^3 (mod n) with 0 <= x <= y < n. %C A376691 This is the same as the number of solutions to x + y == x^2 + y^2 == x^3+y^3 == x^4 + y^4 (mod n) with x <=y. Proved by Sahaj in Math StackExchange link. %H A376691 Math StackExchange, <a href="https://math.stackexchange.com/questions/4978600/if-x-y-equiv-x2-y2-equiv-x3-y3-pmodn-is-it-true-that-xy-equ">If x+y == x^2+y^2 == x^3+y^3 (mod n), is it true that x+y==x^4+y^4(mod n)?</a>. %p A376691 a:=proc(n) %p A376691 local x,y,count; %p A376691 count:=0: %p A376691 for x from 0 to n-1 do %p A376691 for y from x to n-1 do %p A376691 if (x+y) mod n =(x^2+y^2) mod n and (x+y) mod n =(x^3+y^3) mod n then count:=count+1; fi; %p A376691 od: %p A376691 od: %p A376691 count; %p A376691 end: %o A376691 (Python) %o A376691 def A376691(n): %o A376691 c = 0 %o A376691 for x in range(n): %o A376691 m = x*(1-x)%n %o A376691 c += sum(1 for y in range(x,n) if y*(y-1)%n == m and not m*(x-y)%n) %o A376691 return c # _Chai Wah Wu_, Oct 02 2024 %Y A376691 Cf. A376646. %K A376691 nonn %O A376691 1,2 %A A376691 _W. Edwin Clark_, Oct 01 2024