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 31-40 of 510 results. Next

A096030 Values (y-x-1)/2, where x^2+y^2=p,(xA002144.

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 2, 0, 2, 1, 2, 4, 3, 0, 3, 1, 2, 5, 0, 2, 6, 6, 2, 5, 7, 1, 2, 5, 7, 0, 1, 3, 6, 4, 5, 3, 6, 9, 8, 0, 2, 6, 8, 4, 8, 4, 5, 2, 3, 11, 7, 9, 0, 1, 10, 4, 9, 5, 12, 10, 3, 12, 8, 0, 6, 2, 7, 11, 5, 8, 2, 12, 11, 4, 1, 2, 9, 7, 13, 12, 6, 0, 9, 14, 13, 10, 8, 15, 6, 1, 2, 3, 12, 14, 9, 0, 2
Offset: 1

Views

Author

Lekraj Beedassy, Jun 16 2004

Keywords

Crossrefs

Formula

a(n)=(A079887(n) - 1)/2.

Extensions

More terms from Ray Chandler, Jun 26 2004

A173330 First of two intermediate sequences for integral solution of A002144(n)=x^2+y^2.

Original entry on oeis.org

1, 10, 1, 5, 1, 5, 46, 5, 70, 5, 9, 1, 106, 106, 126, 142, 146, 13, 9, 186, 1, 214, 13, 226, 1, 13, 9, 5, 17, 13, 306, 9, 5, 17, 366, 17, 378, 1, 406, 406, 17, 442, 21, 442, 5, 510, 21, 538, 13, 1, 570, 5, 17, 598, 25, 13, 25, 650, 1, 5, 694, 706, 9, 742, 25, 17, 786, 5, 25
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 16 2010

Keywords

Comments

A002972(n) = MIN(a(n), A002144(n) - a(n)).

Examples

			n=7: A002144(7) = 53 = 4*13 + 1,
a(7) = 26! / (2*(13!)^2) mod 53 = 403291461126605635584000000/77551576087265280000 mod 53 = 5200300 mod 53 = 46,
A002972(7) = MIN(46, 53 - 46) = 7;
n=8: A002144(8) = 61 = 4*15 + 1,
a(8) = 30! / (2*(15!)^2) mod 61 = 265252859812191058636308480000000/3420024505448398848000000 mod 61 = 77558760 mod 61 = 5,
A002972(8) = MIN(5, 61 - 5) = 5.
		

References

  • H. Davenport, The Higher Arithmetic (Cambridge University Press 7th ed., 1999), ch. V.3, p.122.

Crossrefs

Formula

a(n) = (2k)! / 2(k!)^2 mod p, where p = 4*k+1 = A002144(n).

A231754 Products of distinct primes congruent to 1 modulo 4 (A002144).

Original entry on oeis.org

1, 5, 13, 17, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 137, 145, 149, 157, 173, 181, 185, 193, 197, 205, 221, 229, 233, 241, 257, 265, 269, 277, 281, 293, 305, 313, 317, 337, 349, 353, 365, 373, 377, 389, 397, 401, 409, 421, 433, 445, 449
Offset: 1

Views

Author

Michel Marcus, Nov 13 2013

Keywords

Comments

Contains A002144 as a subsequence, and is a subsequence of A016813 and of A005117.
Also, these numbers satisfy A231589(n) = floor(n*(n-1)/4) (A011848).

Examples

			65 = 5*13 is in the sequence since both 5 and 13 are congruent to 1 modulo 4.
		

Crossrefs

Intersection of A005117 and A004613.

Programs

  • Maple
    isA231754 := proc(n)
        local d;
        for d in ifactors(n)[2] do
            if op(2,d) > 1 then
                return false;
            elif modp(op(1,d),4) <> 1 then
                return false;
            end if;
        end do:
        true ;
    end proc:
    for n from 1 to 500 do
        if isA231754(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Mar 16 2016
  • Mathematica
    Select[Range[500], # == 1 || AllTrue[FactorInteger[#], Last[#1] == 1 && Mod[First[#1], 4] == 1 &] &] (* Amiram Eldar, Mar 08 2024 *)
  • PARI
    isok(n) = if (! issquarefree(n), return (0)); if (n > 1, f = factor(n); for (i=1, #f~, if (f[i, 1] % 4 != 1, return (0)))); 1

Formula

The number of terms that do not exceed x is ~ c * x / sqrt(log(x)), where c = A088539 * sqrt(A175647) / Pi = 0.3097281805... (Jakimczuk, 2024, Theorem 3.10, p. 26). - Amiram Eldar, Mar 08 2024

A095007 Number of 4k+1 primes (A002144) in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 1, 1, 2, 4, 6, 10, 21, 38, 66, 127, 233, 432, 805, 1511, 2837, 5378, 10186, 19294, 36827, 70157, 133975, 256852, 492882, 946848, 1823129, 3513599, 6780412, 13103462, 25348870, 49090415, 95167380, 184662052, 358630671, 697097364, 1356051342, 2639870329, 5142823877
Offset: 1

Views

Author

Antti Karttunen and Labos Elemer, Jun 01 2004

Keywords

Crossrefs

Formula

a(n) = A036378(n) - A095008(n) = A095009(n) + A095011(n).

Extensions

a(34)-a(38) from Amiram Eldar, Jun 12 2024

A145010 a(n) = area of Pythagorean triangle with hypotenuse p, where p = A002144(n) = n-th prime == 1 (mod 4).

Original entry on oeis.org

6, 30, 60, 210, 210, 180, 630, 330, 1320, 1560, 2340, 990, 2730, 840, 4620, 3570, 5610, 4290, 1710, 7980, 2730, 6630, 10920, 12540, 4080, 8970, 14490, 18480, 9690, 3900, 11550, 25200, 26910, 30600, 34650, 32130, 37050, 7980, 23460, 6090, 29580, 49140, 35700
Offset: 1

Views

Author

M. F. Hasler, Feb 24 2009

Keywords

Comments

Pythagorean primes, i.e., primes of the form p = 4k+1 = A002144(n), have exactly one representation as sum of two squares: A002144(n) = x^2+y^2 = A002330(n+1)^2+A002331(n+1)^2. The corresponding (primitive) integer-sided right triangle with sides { 2xy, |x^2-y^2| } = { A002365(n), A002366(n) } has area xy|x^2-y^2| = a(n). For n>1 this is a(n) = 30*A068386(n).

Examples

			The following table shows the relationship between several closely related sequences:
Here p = A002144 = primes == 1 (mod 4), p = a^2+b^2 with a < b;
a = A002331, b = A002330, t_1 = ab/2 = A070151;
p^2 = c^2+d^2 with c < d; c = A002366, d = A002365,
t_2 = 2ab = A145046, t_3 = b^2-a^2 = A070079,
with {c,d} = {t_2, t_3}, t_4 = cd/2 = ab(b^2-a^2).
  ---------------------------------
   p  a  b  t_1  c   d t_2 t_3  t_4
  ---------------------------------
   5  1  2   1   3   4   4   3    6
  13  2  3   3   5  12  12   5   30
  17  1  4   2   8  15   8  15   60
  29  2  5   5  20  21  20  21  210
  37  1  6   3  12  35  12  35  210
  41  4  5  10   9  40  40   9  180
  53  2  7   7  28  45  28  45  630
		

Crossrefs

Programs

  • Mathematica
    Reap[For[p = 2, p < 500, p = NextPrime[p], If[Mod[p, 4] == 1, area = x*y/2 /. ToRules[Reduce[0 < x <= y && p^2 == x^2 + y^2, {x, y}, Integers]]; Sow[area]]]][[2, 1]] (* Jean-François Alcover, Feb 04 2015 *)
  • PARI
    forprime(p=1,499, p%4==1 | next; t=[p,lift(-sqrt(Mod(-1,p)))]; while(t[1]^2>p,t=[t[2],t[1]%t[2]]); print1(t[1]*t[2]*(t[1]^2-t[2]^2)","))
    
  • PARI
    {Q=Qfb(1,0,1);forprime(p=1,499,p%4==1|next;t=qfbsolve(Q,p); print1(t[1]*t[2]*(t[1]^2-t[2]^2)","))} \\ David Broadhurst

Formula

a(n) = A002365(n)*A002366(n)/2.
a(n) = x*y*(x^2-y^2), where x = A002330(n+1), y = A002331(n+1).

A181413 a(n) is the smallest number such that a(n)^2 + 1 is divisible by A002144(1)* A002144(2)*...* A002144(n).

Original entry on oeis.org

2, 8, 47, 2163, 18543, 241727, 3101272, 842894268, 8245041748, 521781374353, 101476250977928, 671795954794788, 32126984574675193, 425090834074746637, 309609468228403885693, 25836182225971546313682, 38544366727563360743217, 217758730168965028986551783, 25789605237863389220212237968, 309600287787935978580674202007
Offset: 1

Views

Author

Michel Lagneau, Jan 28 2011

Keywords

Examples

			a(1) = 2 because A002144(1) | 2^2+1 = 5 ;
a(2)=8 because A002144(1) * A002144(2) | 8^2+1 = 5*13 ;
a(6) = 241727 because A002144(1) * A002144(2)*...* A002144(6) | 241727^2+1
  = 2 * 5 * 13 * 17 * 29 * 37 * 41 * 601.
		

Crossrefs

Cf. A002144 (Pythagorean primes: primes of form 4n+1) A002731.

Programs

  • Maple
    with(numtheory):nn:=1000:T:=array(1..1000):k:=1:for x from 1 to nn do: p:=4*x+1:if
      type(p, prime)=true then T[k]:=p:k:=k+1:else fi:od:pr:=1:for n from 1 to k do:
      pp:=pr*T[n] :ind:=0:for q from 1 to pp while (ind=0) do: z:=q^2+1:if irem(z,pp)=0
      and ind = 0 then ind: = 1:pr:=pp:print( q):else fi:od:od:
    # Alternative
    PP:= select(isprime, [seq(i,i=5..200,4)]):
    f:= n -> min(map(t -> rhs(op(t)),[msolve(x^2+1, convert(PP[1..n],`*`))])):
    map(f, [$1..20]); # Robert Israel, Feb 01 2019

Extensions

More terms from Robert Israel, Feb 01 2019

A247384 Find the first (maximal) string of consecutive primes of length exactly n which alternate between 4*k+1 and 4*k+3 or 4*k+3 and 4*k+1 as in A002144(4*n+1) and A002145(4*n+3). The first element is a(n).

Original entry on oeis.org

97, 11, 3, 23, 47, 167, 131, 2011, 233, 23633, 34499, 1013, 9341, 90659, 521, 51749, 505049, 1391087, 2264839, 2556713, 17123893, 2569529, 15090641, 18246451, 6160043, 1557431471, 43679609, 198572029, 701575297, 5552898499, 6639843979, 61233611783, 9005520203
Offset: 1

Views

Author

J. M. Bergot, Sep 15 2014

Keywords

Examples

			a(4)=23 because 23,29,31,37 alternate 4*n+3,4*n+1,4*n+3,4*n+1 for exactly four primes and 23 is the least prime for a string of exactly four.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[seq(2*i+1,i=1..10^7)]):
    Pm4:= map(`modp`,[seq((-1)^j*Primes[j],j=1..nops(Primes))],4):
    Starts:= [1,op(select(t -> Pm4[t-1]<> Pm4[t], [$2..nops(Pm4)]))]:
    Lengths:= [seq(Starts[i+1]-Starts[i],i=1..nops(Starts)-1)]:
    for i from 1 to max(Lengths) do A[i]:= ListTools:-Search(i,Lengths) od:
    R:=[seq(A[i],i=1..max(Lengths))]:
    seq(`if`(a=0,0,Primes[Starts[a]]),a=R); # Robert Israel, Sep 15 2014
  • Mathematica
    i = 2; While[ Mod[ Prime[i] - Prime[i - 1], 4] != 0 || Mod[ Prime[i + 1] - Prime[i], 4] != 0, i++]; T = {Prime[i]}; Do[j = 2; While[! (Product[ Mod[ Prime[k + 1] - Prime[k], 4], {k, j, j + n}] != 0 && (Mod[Prime[j] - Prime[j - 1], 4] == 0 || j == 2) && Mod[ Prime[j + n + 2] - Prime[j + n + 1], 4] == 0), j++]; T = Append[T, Prime[j]], {n, 0, 13}]; T (* Jonathan Sondow, Jun 28 2017 *)
  • PARI
    v=vector(100);v[1]=7;cur=1;p=3;forprime(q=5, 1e10, if((q-p)%4==0,if(!v[cur],v[cur]=back(p,cur);print("a("cur") = "v[cur]));cur=1,cur++);p=q) \\ Charles R Greathouse IV, Sep 15 2014

Formula

a(n) = A289118(n) if and only if n > 1 and A289118(n) < A289118(n+1). - Jonathan Sondow, Jun 27 2017

Extensions

More terms from Jens Kruse Andersen, Oct 01 2014
Definition clarified by Jonathan Sondow, Jun 25 2017

A253802 a(n) gives the odd leg of one of the two Pythagorean triangles with hypotenuse A080109(n) = A002144(n)^2. This is the smaller of the two possible odd legs.

Original entry on oeis.org

7, 65, 161, 41, 1081, 369, 1241, 671, 721, 3471, 959, 9401, 4681, 1695, 3281, 7599, 10199, 24521, 3439, 18335, 37241, 45241, 24465, 29281, 64001, 18561, 31855, 27761, 76601, 7825
Offset: 1

Views

Author

Wolfdieter Lang, Jan 14 2015

Keywords

Comments

The corresponding even legs are given in 4*A253803.
The legs of the other Pythagorean triangle with hypotenuse A080109(n) are given A253804(n) (odd) and A253805(n) (even).
Each fourth power of a prime of the form 1 (mod 4) (see A002144(n)^2 = A080175(n)) has exactly two representations as sum of two positive squares (Fermat). See the Dickson reference, (B) on p. 227.
This means that there are exactly two Pythagorean triangles (modulo leg exchange) for each hypotenuse A080109(n) = A002144(n)^2, n >= 1. See the Dickson reference, (A) on p. 227.
Note that the Pythagorean triangles are not always primitive. E.g., n = 2: (65, 4*39, 13^2) = 13*(5, 4*3, 13). For each prime congruent 1 (mod 4) (A002144) there is one and only one such non-primitive triangle with hypotenuse p^2 (just scale the unique primitive triangle with hypotenuse p with the factor p). Therefore, one of the two existing Pythagorean triangles with hypotenuse from A080109 is primitive and the other is imprimitive.

Examples

			n = 7: A080175(7) = 7890481 = 53^4 = 2809^2; A002144(7)^4  =  a(7)^2 + (4*A253803(7))^2 = 1241^2 + (4*630)^2.
The other Pythagorean triangle with hypotenuse 53^2 = 2809 has odd leg A253804(7) = 2385 and even leg 4*A253305(7) = 4*371 = 1484: 53^4 = 2385^2 + (4*371)^2.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.

Crossrefs

Formula

A080175(n) = A002144(n)^4 = a(n)^2 + (4*A253803(n))^2,
n >= 1, that is,
a(n) = sqrt(A080175(n) - (4*A253803(n))^2), n >= 1.

A253803 a(n) gives one fourth of the even leg of one of the two Pythagorean triangles with hypotenuse A080109(n) = A002144(n)^2. The odd leg is given in A253802(n).

Original entry on oeis.org

6, 39, 60, 210, 210, 410, 630, 915, 1320, 1780, 2340, 990, 2730, 3164, 4620, 5215, 5610, 4290, 8145, 8106, 2730, 6630, 12116, 12540, 4080, 17485, 17451, 18480, 9690, 24414
Offset: 1

Views

Author

Wolfdieter Lang, Jan 14 2015

Keywords

Comments

See A253802 for comments and the Dickson reference.

Examples

			n = 7: A080175(7) = 7890481 = 53^4 = 2809^2; A002144(7)^4 = A253802(7)^2 + (4*a(7))^2 = 1241^2 + (4*630)^2.
The other Pythagorean triangle with hypotenuse
53^2 = 2809 has odd leg A253804(7) = 2385 and even leg 4*A253305(7) = 4*371 = 1484: 53^4 = 2385^2 + (4*371)^2.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.

Crossrefs

Formula

a(n) = sqrt(A080109(n)^2 - A253802(n)^2)/4, n >= 1.

A253804 a(n) gives the odd leg of the second of the two Pythagorean triangles with hypotenuse A080109(n) = A002144(n)^2. This is the larger of the two possible odd legs.

Original entry on oeis.org

15, 119, 255, 609, 1295, 1519, 2385, 3479, 4015, 4879, 6305, 9999, 9919, 12319, 14385, 16999, 13345, 28545, 32039, 19199, 38415, 50609, 32239, 50369, 65535, 62839, 50279, 64911, 83505, 96719
Offset: 1

Views

Author

Wolfdieter Lang, Jan 16 2015

Keywords

Comments

The corresponding even legs are given in 4*A253805.
The legs of the other Pythagorean triangle with hypotenuse A080109(n) are given A253802(n) (odd) and A253803(n) (even).
Each fourth power of a prime of the form 1 (mod 4) (see A002144(n)^= A080175(n)) has exactly two representations as sum of two positive squares (Fermat). See the Dickson reference, (B) on p. 227.
This means that there are exactly two Pythagorean triangles (modulo leg exchange) for each hypotenuse A080109(n) = A002144(n)^2, n >= 1. See the Dickson reference, (A) on p. 227.
Concerning the primitivity question of these triangles see a comment on A253802.

Examples

			n = 7: A080175(7) = 7890481 = 53^4 = 2809^2; A002144(7)^4 = a(7)^2 + (4*A253805(7))^2 = 2385^2 + (4*371)^2.
The other Pythagorean triangle with hypotenuse 53^2 = 2809 has odd leg A253802(7) = 1241 and even leg 4*A253303(7) = 4*630 = 2520: 53^4 = 1241^2 + (4*630)^2.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.

Crossrefs

Formula

A080175(n) = A002144(n)^4 = a(n)^2 + (4*A253805(n))^2,
n >= 1, that is,
a(n) = sqrt(A080175(n) - (4*A253805(n))^2), n >= 1.
Previous Showing 31-40 of 510 results. Next