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.

Previous Showing 51-60 of 510 results. Next

A145873 Smallest k such that k^2+1 is divisible by A002144(n)^9.

Original entry on oeis.org

280182, 822557039, 24306922095, 4563230639355, 15069267560119, 112076323050317, 50928660480181, 3138611770750343, 9110883894036198, 50251663587824641, 76004727767164666, 310872228812491206, 521749964271465
Offset: 1

Views

Author

Klaus Brockhaus, Oct 30 2008

Keywords

Examples

			a(1) = 280182 since A002144(1) = 5, 280182^2+1 = 78501953125 = 5^9*40193 and for no k < 280182 does 5^9 divide k^2+1. a(3) = 24306922095 since A002144(3) = 17, 24306922095^2+1 = 590826461732399189026 = 2*17^9*29*673*127637 and for no k < 24306922095 does 17^9 divide k^2+1.
		

Crossrefs

Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145297, A145298, A145299, A145871, A145872.

A186814 a(n) = smallest number m such that A002144(n) divides gcd(A002314(n)^2+1,(A002314(n)+m)^2+1).

Original entry on oeis.org

1, 3, 9, 5, 25, 23, 7, 39, 19, 21, 53, 81, 43, 83, 63, 61, 101, 13, 143, 31, 169, 15, 55, 113, 225, 105, 157, 175, 17, 263, 89, 41, 77, 269, 165, 159, 271, 361, 123, 363, 75, 315, 239, 365, 93, 51, 437, 321, 397, 529, 439, 351, 543, 229, 333, 355, 449, 557, 625, 431, 517, 27, 583
Offset: 1

Views

Author

Michel Lagneau, Feb 27 2011

Keywords

Comments

Sequence A002314 gives the minimal integer square root of -1 modulo p(n),where p(n) = n-th prime of form 4k+1.

Examples

			for n=1, k = A002314(1) = 2 => a(1) = 1, because 2^2+1 = 5 and (2+1)^2+1 = 2*5 ;
for n=2, k = A002314(2) = 5 => a(2) = 3, because 5^2+1 = 2*13 and (5+3)^2+1 = 5*13 ;
for n=3, k = A002314(3) = 4 => a(3) = 9, because 4^2+1 = 17 and (4+9)^2+1 = 2*5*17;
for n=4, k = A002314(4)= 12 => a(4)= 5, because 12^2+1
= 5*29 and (12+5)^2+1 = 2*5*29, and 29 divides
GCD(5*29, 2*5*29)=145.
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..90):j:=1:for i from 1 to 250 do:x:=4*i+1:if type(x,prime)=true
      then T[j]:=x:j:=j+1:else fi:od:for p from 1 to j do:u:=T[p]:id:=0: for m from
      1 to 1000 while(id=0) do: z:=m^2+1:for d from 1 to u while(id=0) do: z1:=(m+d)^2+1:zz:=
      gcd(z,z1):if irem(zz,u)=0 then id:=1:printf(`%d, `,d):else fi:od:od:od:

A209877 a(n) = A209874(n)/2: Least m > 0 such that 4*m^2 = -1 modulo the Pythagorean prime A002144(n).

Original entry on oeis.org

1, 4, 2, 6, 3, 16, 15, 25, 23, 17, 11, 5, 38, 49, 50, 22, 14, 40, 81, 56, 7, 61, 72, 32, 8, 41, 30, 114, 69, 144, 57, 74, 68, 21, 52, 137, 167, 10, 133, 196, 127, 191, 174, 24, 104, 143, 26, 59, 43, 12, 258, 238, 289, 97, 77, 252, 53, 29, 13, 283, 48, 190, 335, 361, 31, 228, 291, 159, 263, 123, 260, 325, 363, 247, 162
Offset: 1

Views

Author

M. F. Hasler, Mar 14 2012

Keywords

Comments

Also: Square root of -1/4 in Z/pZ, for Pythagorean primes p=A002144(n).
Also: Least m>0 such that the Pythagorean prime p=A002144(n) divides 4(kp +/- m)^2+1 for all k>=0.
In practice these can also be determined by searching the least N^2+1 whose least prime factor is p=A002144(n): For given p, all of these N will have a(n) or p-a(n) as remainder mod 2p.

Examples

			a(1)=1 since A002144(1)=5 and 4*1^2+1 is divisible by 5; as a consequence 4*(5k+/-1)^2+1 = 100k^2 +/- 40k + 5 is divisible by 5 for all k.
a(2)=4 since A002144(2)=13 and 4*4^2+1 = 65 is divisible by 13, while 4*1^1+1=5, 4*2^2+1=17 and 4*3^2+1=37 are not. As a consequence, 4*(13k+/-4)^2+1 = 13(...)+4*4^1+1 is divisible by 13 for all k.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local m;
       if not isprime(p) then return NULL fi;
       m:= numtheory:-msqrt(-1/4, p);
       min(m,p-m);
    end proc:
    map(f, [seq(i,i=5..1000,4)]); # Robert Israel, Mar 13 2018
  • Mathematica
    f[p_] := Module[{r}, r /. Solve[4 r^2 == -1, r, Modulus -> p] // Min];
    f /@ Select[4 Range[300] + 1, PrimeQ] (* Jean-François Alcover, Jul 27 2020 *)
  • PARI
    apply(p->lift(sqrt(Mod(-1,p)/4)), A002144)

A279392 Bisection of primes congruent to 1 modulo 4 (A002144), depending on the corresponding sum of the A002972 and 2*A002973 entries being congruent to 1 modulo 4 or not. Here we give the first case.

Original entry on oeis.org

13, 17, 41, 53, 89, 97, 109, 149, 157, 229, 233, 257, 281, 313, 317, 337, 353, 373, 397, 401, 421, 433, 457, 461, 557, 569, 577, 601, 641, 709, 733, 769, 797, 809, 829, 853, 857, 881, 953, 997, 1013, 1021, 1049, 1061, 1097, 1153, 1193, 1201, 1213, 1229, 1277, 1297
Offset: 1

Views

Author

Wolfdieter Lang, Dec 11 2016

Keywords

Comments

The primes from A002144 (1 (mod 4) primes) have the property A002144(n) = A002972(n)^2 + (2*A002973(n))^2 = A(n)^2 + B(n)^2 with odd A(n) and even B(n). A bisection of A002144 is given depending on A(n) + B(n) == 1 (mod 4) (part I) or A(n) + B(n) == 3 (mod 4) (part II). The present sequence gives part I of this bisection. The other part II is given in A279393.
This bisection appears in the formula for the p-defects of the congruence y^2 == x^3 + 4*x (mod p) for primes p == 1 (mod 4). See A278720 where for nonvanishing entries the sign is conjectured to be + for these part I primes, and it is - for the part II primes from A279393.

Examples

			a(1) = 13 is the first prime from A002144 which has A + B = 1 (mod 4) because 13 = A002144(2) = A(2)^2 + B(2)^2 = 3^2 + (2*1)^2, and 3 + 2 = 5 == 1 (mod 4), and A002144(1) = 5 leads to A + B = 3 (mod 4), because 5 = 1^2 + (2*1)^2.
		

Crossrefs

Formula

A prime A002144(m) = A(m)^2 + B(m)^2 belongs to this sequence iff (-1)^((A(m)-1)/2 + B(m)/2) = +1, where A(m) = A002972(m) and B(m)/2 = A002973(m).

Extensions

More terms from Jinyuan Wang, Apr 20 2025

A279393 Bisection of primes congruent to 1 modulo 4 (A002144), depending on the corresponding sum of the A002972 and 2*A002973 entries being congruent to 1 modulo 4 or not. Here we give the second case.

Original entry on oeis.org

5, 29, 37, 61, 73, 101, 113, 137, 173, 181, 193, 197, 241, 269, 277, 293, 349, 389, 409, 449, 509, 521, 541, 593, 613, 617, 653, 661, 673, 677, 701, 757, 761, 773, 821, 877, 929, 937, 941, 977, 1009, 1033, 1069, 1093, 1109, 1117, 1129, 1181, 1217, 1237, 1249, 1289
Offset: 1

Views

Author

Wolfdieter Lang, Dec 11 2016

Keywords

Comments

See A279392 for details of this bisection of the primes of A002144. This sequence gives the part II of primes congruent 1 modulo 4.

Examples

			a(1) = 5 = A002144(1) and A002972(1) = 1 and 2*A002973(1) = 2, hence 1 + 2 = 3 == 3 (mod 4), and 5 belongs to part II of this bisection.
		

Crossrefs

Formula

A prime A002144(m) = A(m)^2 + B(m)^2 belongs to this sequence iff (-1)^((A(m)-1)/2 + B(m)/2) = -1, where A(m) = A002972(m) and B(m)/2 = A002973(m).

Extensions

More terms from Jinyuan Wang, Apr 20 2025

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

Original entry on oeis.org

2, 5, 13, 12, 31, 9, 23, 11, 27, 34, 22, 91, 33, 15, 37, 44, 129, 80, 162, 81, 183, 122, 144, 64, 16, 187, 217, 53, 138, 288, 114, 189, 213, 42, 104, 274, 63, 381, 266, 29, 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
Offset: 1

Views

Author

Hiroyuki Hara, Aug 06 2020

Keywords

Comments

Let p(n) = A002144(n) be the n-th Pythagorean prime.
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).
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.
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)|.
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).

Examples

			p(1)=5: (5-2)!=2*3=a(1)*(5-a(1))==1 mod 5. 5=2+3.
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.
a(n)=13: b(n)=(k*13+1)/(13-k)=(3*13+1)/(13-3)=4, k=3. p(n)=13+4=17.
a(n)=12: b(n)=(k*12+1)/(12-k)=(7*12+1)/(12-7)=17, k=7. p(n)=12+17=29.
		

Crossrefs

Cf. A336884, A002144 (Pythagorean primes), A206549, A209874, A256011, A186814, A282538.

Programs

  • Mathematica
    Map[Mod[((# - 1)/2)!, #] &, Select[4 Range[192] + 1, PrimeQ]] (* Michael De Vlieger, Oct 15 2020 *)
  • PARI
    my(v=select(p->p%4==1, primes(100))); apply(x->(((x-1)/2)! % x), v) \\ Michel Marcus, Aug 07 2020
    
  • Python
    n_start=5
    n_end=n_start+10000
    k = 1
    for n in range(n_start, n_end, 4):
        c=(n-1)//2
        r=1
        for i in range(2, c+1):
            r=r*i % n
            if r==0:
                break
        if (n-r)*r % n ==1:
            print(k, r)
            k = k + 1
    # modified by Georg Fischer, Oct 16 2020

A336884 a(n) = A002144(n) - A336883(n) where A002144(n) is the n-th Pythagorean prime.

Original entry on oeis.org

3, 8, 4, 17, 6, 32, 30, 50, 46, 55, 75, 10, 76, 98, 100, 105, 28, 93, 19, 112, 14, 107, 89, 177, 241, 82, 60, 228, 155, 25, 203, 148, 136, 311, 269, 115, 334, 20, 143, 392, 179, 67, 109, 413, 208, 235, 52, 118, 86, 553, 516, 476, 35, 194, 154, 504, 106, 58, 26, 566, 613, 353, 670, 722
Offset: 1

Views

Author

Hiroyuki Hara, Aug 06 2020

Keywords

Comments

For more information see A336883.

Examples

			p(1)=5: (5-2)!=2*3=A336883(1)*a(1)==1 mod 5. 5=2+3.
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==A336883(2)*a(2)==1 mod 13. 13=5+8.
a(n)=4: A336883(n)=(k*4+1)/(4-k)=(3*4+1)/(4-3)=13, k=3. p(n)=13+4=17.
a(n)=17: A336883(n)=(k*17+1)/(17-k)=(7*17+1)/(17-7)=12, k=7. p(n)=12+17=29.
		

Crossrefs

Cf. A336883, A002144 (Pythagorean primes), A206549, A209874, A256011, A186814, A282538.

Programs

  • Mathematica
    v = Select[Prime[Range[1000]], Mod[#, 4] == 1&];
    v - Mod[((v-1)/2)!, v] (* Jean-François Alcover, Oct 24 2020, after PARI *)
  • PARI
    my(v=select(p->p%4==1, primes(100))); apply(x->x - (((x-1)/2)! % x), v) \\ Michel Marcus, Aug 07 2020
    
  • Python
    n_start=5
    n_end=n_start+100000
    k=1
    for n in range(n_start, n_end, 4):
        c=(n-1)//2
        r=1
        for i in range(2, c+1):
            r=r*i % n
            if r==0:
                break
        if (n-r)*r % n ==1:
            print(k, n-r)
            k = k + 1
    # modified by Georg Fischer, Oct 16 2020

Formula

a(n) == (A002144(n) - 2)!/((A002144(n) - 1)/2)! == -((A002144(n) - 1)/2)! == -A336883(n) == A002144(n) - A336883(n) mod A002144(n).

A376430 Numbers that can appear as both short and long legs of Pythagorean triangles with Pythagorean primes A002144 as hypotenuses.

Original entry on oeis.org

12, 15, 35, 40, 45, 60, 72, 80, 105, 112, 132, 140, 165, 168, 180, 195, 209, 221, 231, 252, 255, 260, 275, 285, 299, 312, 325, 340, 380, 391, 399, 408, 420, 425, 440, 459, 465, 520, 532, 575, 595, 600, 609, 612, 651, 660, 700, 728, 741, 748, 759, 760, 779, 780, 800
Offset: 1

Views

Author

Hugo Pfoertner, Sep 23 2024

Keywords

Comments

Intersection of A002365 and A002366.

Examples

			a(1) = 12, because it is the long leg in the triangle (5, 12, 13) and the short leg in (12, 35, 37);
a(2) = 15: long leg in (8, 15, 17), short leg in (15, 112, 113).
		

Crossrefs

A068386 One-thirtieth the area of the unique Pythagorean triangle whose hypotenuse is A002144(n), the n-th prime of the form 4k+1.

Original entry on oeis.org

1, 2, 7, 7, 6, 21, 11, 44, 52, 78, 33, 91, 28, 154, 119, 187, 143, 57, 266, 91, 221, 364, 418, 136, 299, 483, 616, 323, 130, 385, 840, 897, 1020, 1155, 1071, 1235, 266, 782, 203, 986, 1638, 1190, 1653, 1683, 2046, 2387, 1463, 2002, 460, 2852, 2204, 357
Offset: 2

Views

Author

Lekraj Beedassy, Mar 08 2002

Keywords

Comments

Every such prime p has a unique representation as p = r^2 + s^2 with 1 <= r < s. The corresponding right triangle has legs of lengths s^2 - r^2 and 2rs and area rs(s^2 - r^2). For p > 5, this is divisible by 30.
Calling A002330(n) and A002331(n) respectively u and v, we have a(n) = u*v*(u-v)*(u+v), for n > 1. - Lekraj Beedassy, Mar 12 2002
The corresponding Pythagorean triple (A, B, C) with A^2 = B^2 + C^2, (A > B > C) is given by {A002144(n), A002365(n), A002366(n)}, so that a(n) = B*C/(2*30) = A002365(n)*A002366(n)/60. - Lekraj Beedassy, Oct 27 2003

Examples

			The 7th prime of the form 4k+1 is 53 = 2^2 + 7^2. So the right triangle has sides 7^2 - 2^2 = 45, 2*2*7 = 28 and 53. Its area is 1/2 * 45 * 28 = 630, so a(7) = 630/30 = 21.
		

Crossrefs

Programs

  • Mathematica
    a30[p_] := For[r=1, True, r++, If[IntegerQ[s=Sqrt[p-r^2]], Return[r s(s^2-r^2)/30]]]; a30/@Select[Prime/@Range[4, 150], Mod[ #, 4]==1&]
    areat[p_]:=Module[{c=Flatten[PowersRepresentations[p,2,2]],a,b},a= First[c];b= Last[c];((b^2-a^2)(2a b))/2]; areat[#]/30&/@Select[Prime[ Range[4,200]],IntegerQ[(#-1)/4]&] (* Harvey P. Dale, Jun 21 2011 *)

Extensions

Edited by Dean Hickerson, Mar 14 2002

A114200 When the n-th term of this sequence is added to or subtracted from the square of the n-th prime of the form 4k + 1 (i.e., A002144(n)), the result in both cases is a square.

Original entry on oeis.org

24, 120, 240, 840, 840, 720, 2520, 1320, 5280, 6240, 9360, 3960, 10920, 3360, 18480, 14280, 22440, 17160, 6840, 31920, 10920, 26520, 43680, 50160, 16320, 35880, 57960, 73920, 38760, 15600, 46200, 100800, 107640, 122400, 138600, 128520, 148200
Offset: 1

Views

Author

Owen Mertens (owenmertens(AT)missouristate.edu), Nov 16 2005

Keywords

Comments

This sequence and A002144 give rise to a class of monic polynomials x^2 + bx + c where b = +- A002144(n) and c = +- a(n)/4 that will factor over the integers regardless of the sign of c. For example, x^2 - 13x - 30 and x^2 - 13x + 30 are two such polynomials. Further polynomials with this property can be found by transforming the roots.

Examples

			a(2) = 120 and A002144(2) = 13. 13^2 - 120 = 7^2 and 13^2 + 120 = 17^2.
		

Crossrefs

Cf. A002144.

Programs

  • PARI
    getpr(n) = {nb = 0; p = 2; while (nb != n, p = nextprime(p+1); if ((p % 4) == 1, nb++);); p;}
    a(n) = {p = getpr(n); psq = p^2; k = 1; while (!issquare(psq+k) || !issquare(psq-k), if (k>psq, k = 0; break); k++;); k;} \\ Michel Marcus, Sep 25 2013

Extensions

Definition corrected by Zak Seidov, Jul 20 2010
a(17) corrected by Zachary Sizer, Jan 01 2025
Previous Showing 51-60 of 510 results. Next