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.

A336883 a(n) = ((A002144(n) - 1)/2)! (mod A002144(n)) where A002144(n) is the n-th Pythagorean prime.

This page as a plain text file.
%I A336883 #67 Dec 21 2024 15:20:07
%S A336883 2,5,13,12,31,9,23,11,27,34,22,91,33,15,37,44,129,80,162,81,183,122,
%T A336883 144,64,16,187,217,53,138,288,114,189,213,42,104,274,63,381,266,29,
%U A336883 254,382,348,48,301,286,489,439,483,24,77,125,578,423,487,149,555,615,651,135,96,380,87,39,707
%N A336883 a(n) = ((A002144(n) - 1)/2)! (mod A002144(n)) where A002144(n) is the n-th Pythagorean prime.
%C A336883 Let p(n) = A002144(n) be the n-th Pythagorean prime.
%C A336883 Pythagorean prime p can be divided into a pair of integers (a,b) such as p =a+b and a*b==1 mod p. And (p-2)!==1 mod p because of Wilson's Theorem (p-1)!==-1 mod p. It can be divided into two parts (a,b) such as {2*3*4*...*((p(n)-1)/2)==a(n) mod p(n)} and {((p(n)-1)/2+1)*...*(p(n)-4)*(p(n)-3)*(p(n)-2)==-a(n)==(p(n)-a(n)) mod p(n)}. The pair numbers make a(n)+(p(n)-a(n))=p(n) and a(n)*(p(n)-a(n))==1 mod p(n). The left integer of the pair numbers is a(n). The right integer (p(n)-a(n)) is A336884(n).
%C A336883 The set of selecting odd numbers from {a(n)} and A336884 is A206549. The set of selecting even numbers from {a(n)} and A336884 is A209874 except for the number 1. A256011 never appears in {a(n)} or A336884. It is related to nonexistence of numbers that the largest prime factor of n^2+1 is greater than n.
%C A336883 The odd number of the difference |a(n)-A336884(n)|=|a(n)-(p(n)-a(n))|=|2*a(n)-p(n)| is A186814(n). A282538 never appears in the set of the difference |a(n)-A336884(n)|.
%C A336883 If p(n) is unknown, p(n) can be derived from a(n) using following equation. From a*b==1 mod p, a*b=k*p+1. With p=a+b, it can transform to b(n)=(k*a(n)+1)/(a(n)-k), k is an odd integer parameter when the fraction makes an integer. If there are many k's, select the minimum k in those. Then a(n)+b(n)=p(n). b(n) is A336884(n).
%H A336883 Hiroyuki Hara, <a href="/A336883/b336883.txt">Table of n, a(n) for n = 1..4783</a> [reformatted and restored by _Georg Fischer_, Oct 15 2020]
%e A336883 p(1)=5: (5-2)!=2*3=a(1)*(5-a(1))==1 mod 5. 5=2+3.
%e A336883 p(2)=13: (13-2)!=(2*3*4*5*6)*(7*8*9*10*11)=(2*3*4*5*6)*((p-6)*(p-5)*(p-4)*(p-3)*(p-2))==5*(-5)==5*(13-5)=5*8==a(2)*(13-a(2))==1 mod 13. 13=5+8.
%e A336883 a(n)=13: b(n)=(k*13+1)/(13-k)=(3*13+1)/(13-3)=4, k=3. p(n)=13+4=17.
%e A336883 a(n)=12: b(n)=(k*12+1)/(12-k)=(7*12+1)/(12-7)=17, k=7. p(n)=12+17=29.
%t A336883 Map[Mod[((# - 1)/2)!, #] &, Select[4 Range[192] + 1, PrimeQ]] (* _Michael De Vlieger_, Oct 15 2020 *)
%o A336883 (PARI) my(v=select(p->p%4==1, primes(100))); apply(x->(((x-1)/2)! % x), v) \\ _Michel Marcus_, Aug 07 2020
%o A336883 (Python) n_start=5
%o A336883 n_end=n_start+10000
%o A336883 k = 1
%o A336883 for n in range(n_start, n_end, 4):
%o A336883     c=(n-1)//2
%o A336883     r=1
%o A336883     for i in range(2, c+1):
%o A336883         r=r*i % n
%o A336883         if r==0:
%o A336883             break
%o A336883     if (n-r)*r % n ==1:
%o A336883         print(k, r)
%o A336883         k = k + 1
%o A336883 # modified by _Georg Fischer_, Oct 16 2020
%Y A336883 Cf. A336884, A002144 (Pythagorean primes), A206549, A209874, A256011, A186814, A282538.
%K A336883 nonn
%O A336883 1,1
%A A336883 _Hiroyuki Hara_, Aug 06 2020