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 11-18 of 18 results.

A284035 Upper twin primes which correspond to the hypotenuse in a Pythagorean triple whose short leg is also a prime.

Original entry on oeis.org

5, 13, 61, 181, 421, 3121, 5101, 60901, 83641, 100801, 135721, 161881, 163021, 218461, 273061, 491041, 595141, 637321, 697381, 1064341, 1108561, 1171981, 1806901, 2574181, 2601481, 2740141, 2763601, 2853661, 3248701, 3535141, 3567121, 3696481, 3723721, 3729181, 4832941
Offset: 1

Views

Author

Giuseppe Coppoletta, Mar 19 2017

Keywords

Comments

A284034 gives the corresponding short leg primes in the definition.

Examples

			The prime q = 3121 is in the sequence because q - 2 = 3119 is prime and {79, 3120, 3121} is a Pythagorean triple with prime short leg (see example in A284034).
		

Crossrefs

Programs

  • PARI
    lista(nn) = forprime(p=3, nn, if (isprime(p) && isprime((p^2-3)/2) && isprime(q=(p^2+1)/2), print1(q, ", "))); \\ Michel Marcus, Apr 01 2017

Formula

A284034(n)^2 + (a(n) - 1)^2 = a(n)^2, i.e., a(n) = (A284034(n)^2 + 1)/2.

Extensions

More terms from Michel Marcus, Apr 01 2017

A308442 Primes of the form (p^k+1)/2 where p is prime and k > 1.

Original entry on oeis.org

5, 13, 41, 61, 181, 313, 421, 1201, 1741, 1861, 2521, 3121, 5101, 7321, 8581, 9661, 14281, 16381, 19801, 36721, 41761, 60901, 71821, 83641, 100801, 106261, 135721, 139921, 161881, 163021, 199081, 205441, 218461, 273061, 282001, 337021, 353641, 388081, 431521, 491041, 531481, 539761, 552301, 571381
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 27 2019

Keywords

Comments

The only primes of the form (p^k-1)/2 are A076481, since (p^k-1)/2 is divisible by (p-1)/2.
k must be a power of 2, since if k has an odd divisor d>1, (p^k+1)/2 is divisible by (p^(k/d)+1)/2.

Examples

			a(3) = 41 is in the sequence because 41 = (3^4 + 1)/2.
		

Crossrefs

Cf. A076481.
Contains A067756.

Programs

  • Maple
    N:= 10^6: # to get terms <= N
    p:= 2:
    Res:= NULL:
    do
      p:= nextprime(p);
      if p^2 >= 2*N then break fi;
      pk:= p;
      do
        pk:= pk^2;
        if pk >= 2*N then break fi;
        v:= (pk+1)/2;
        if isprime(v) then Res:= Res, v;
        fi;
      od
    od:
    sort([Res]); # Robert Israel, May 27 2019

A328058 Primes p such that 2*p-1 is a semiprime.

Original entry on oeis.org

5, 11, 13, 17, 29, 43, 47, 61, 67, 71, 73, 89, 101, 103, 107, 109, 127, 151, 181, 191, 197, 223, 227, 241, 251, 269, 277, 283, 317, 349, 359, 373, 397, 409, 421, 433, 457, 461, 467, 487, 521, 541, 569, 571, 631, 643, 647, 659, 673, 701, 709, 719, 733, 739, 751, 757, 769, 821, 857, 859, 881, 883
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Oct 03 2019

Keywords

Examples

			a(3)=13 is in the sequence because it is prime and 2*13-1=5^2 is a semiprime.
		

Crossrefs

Cf. A000040, A001358. Includes A067756 and A162336.

Programs

  • Magma
    [p: p in PrimesUpTo(1000)| &+[d[2]: d in Factorization(2*p-1)] eq 2]; // Marius A. Burtea, Oct 03 2019
    
  • Maple
    select(t -> isprime(t) and numtheory:-bigomega(2*t-1)=2, [2,seq(i,i=3..10000,2)]);
  • Mathematica
    Select[Prime@ Range@ 153, PrimeOmega[2 # - 1] == 2 &] (* Michael De Vlieger, Oct 03 2019 *)
  • PARI
    isok(p) = isprime(p) && (bigomega(2*p-1) == 2); \\ Michel Marcus, Oct 04 2019

A334802 Positive integers of the form x^4 - y^4 that have exactly 4 divisors.

Original entry on oeis.org

15, 65, 671, 3439, 12209, 102719, 113521, 178991, 246559, 515201, 1124111, 1342879, 2964961, 3940399, 9951391, 21254449, 27220159, 34209169, 45259649, 48986321, 70710641, 92110289, 93084991, 125620111, 131687681, 144402721, 201792079, 211782751, 276694241
Offset: 1

Views

Author

C. Kenneth Fan, May 12 2020

Keywords

Comments

If a(n) = pq, where p > q are both prime, then p is the hypotenuse and q is a leg of a primitive Pythagorean triple. (x^4-y^4 = (x^2+y^2)(x+y)(x-y), hence x-y=1 and x^2+y^2 and x+y are both prime. Note that x^2+y^2 can never be (x+y)^2 so a(n) is never the cube of a prime.)

Examples

			2^4 - 1^4 = 15 = 3*5 and (3, 4, 5) is a Pythagorean triple, so 15 is a term.
6^4 - 5^4 = 671 = 11*61 and (11, 60, 61) is a Pythagorean triple, so 671 is a term.
		

Crossrefs

Cf. A068501.
Intersection of A030513 and A147857.

Programs

  • Maple
    f:= proc(y) if isprime(2*y+1) and isprime(2*y^2 + 2*y+1) then (2*y+1)*(2*y^2+2*y+1) fi end proc:
    map(f, [$1..1000]); # Robert Israel, Jun 16 2020
  • Mathematica
    Select[(#^4 - (#-1)^4) & /@ Range[420], DivisorSigma[0, #] == 4 &] (* Giovanni Resta, May 12 2020 *)

Formula

a(n) = (b(n)+1)^4 - b(n)^4 with b(n)=A068501(n).
a(n) = A048161(n)*A067756(n).

A342583 Numbers k such that prime(k) is the hypotenuse of a Pythagorean triple where one leg is also prime.

Original entry on oeis.org

3, 6, 18, 42, 82, 271, 284, 369, 445, 682, 1069, 1193, 1900, 2241, 3894, 6137, 7108, 8164, 9658, 10126, 12645, 14842, 14936, 17913, 18420, 19480, 23893, 24605, 28959, 32913, 36279, 40847, 43936, 44559, 45500
Offset: 1

Views

Author

Ivan N. Ianakiev, Mar 16 2021

Keywords

Comments

In such a triangle, the leg that is not prime is always the largest one and is equal to prime(k)-1; these even legs are in A067755. E.g. for a(2) = 6, prime(6) = 13 and the corresponding Pythagorean triple is (5, 12, 13). - Bernard Schott, Apr 03 2021

Examples

			a(1) = 3, since prime(3) = 5 is the hypotenuse of the triple (3,4,5).
		

Crossrefs

Cf. A067756 (the hypotenuses).

Programs

  • Maple
    R:= NULL: count:= 0:
    p:= 2:
    while count < 100 do
      p:= nextprime(p); n:= (p-1)/2; q:= 2*n^2+2*n+1;
      if isprime(q) then
        count:= count+1; r:= numtheory:-pi(q); R:= R, r;
      fi
    od:
    R; # Robert Israel, Mar 22 2021
  • Mathematica
    PrimePi[Take[Cases[Import["https://oeis.org/A067756/b067756.txt","Table"],{,}][[All,2]],100]]

A087939 Prime hypotenuse of primitive Pythagorean triangles with nonprime odd short leg.

Original entry on oeis.org

41, 89, 97, 113, 149, 157, 193, 233, 269, 277, 313, 317, 337, 353, 389, 433, 461, 521, 541, 557, 569, 613, 617, 653, 673, 709, 761, 769, 773, 797, 821, 853, 881, 929, 937, 953, 1009, 1013, 1069, 1097, 1109, 1117, 1129, 1201, 1213, 1217, 1249, 1301, 1361
Offset: 1

Views

Author

Lekraj Beedassy, Oct 27 2003

Keywords

Comments

For prime hypotenuse of primitive Pythagorean triangle with prime (short) leg see A067756.

Extensions

Corrected and extended by Ray Chandler, Oct 28 2003

A174885 Prime hypotenuses c with concatenation p = c//a//b a prime number.

Original entry on oeis.org

29, 409, 461, 661, 929, 1249, 1289, 1381, 1801, 1901, 2081, 2609, 2621, 2749, 3041, 3301, 3881, 5309, 5701, 6421, 6481, 6521, 6529, 7349, 7489, 7789, 8641, 8849, 9349, 9629, 9649, 9689, 9829, 10321, 10709, 10861, 12841, 14321, 14561, 15061, 16661
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 01 2010

Keywords

Comments

See comments in A174825
c is the prime hypotenuse c, i. e. c of a primitive Pythagorean triple: a^2 + b^2 = c^2

Examples

			p = c//a//b: 292021, 409120391, 461380261, 661300589, 929920129, 1249960799, 12895601161,
13811020931, 18011680649, 19011820549, 208116401281, 260918801809, 262111002379,
27492580949, 30414403009, 330129401501, 388123603081, 53095300309, 570122205251
29^2=20^2+21^2, 409^2=120^2+391^2, 461^2=380^2+261^2,
661^2=300^2+589^2, 929^2=920^2+129^2, 1249^2=960^2+799^2,
1289^2=560^2+1161^2,1381^2=1020^2+931^2, 1801^2=1680^2+649^2,
1901^2=1820^2+549^2, 2081^2=1640^2+1281^2, 2609^2=1880^2+1809^2,
2621^2=1100^2+2379^2, 2749^2=2580^2+949^2, 3041^2=440^2+3009^2,
3301^2=2940^2+1501^2, 3881^2=2360^2+3081^2, 5309^2=5300^2+309^2,
5701^2=2220^2+5251^2
		

References

  • W. W. R. Ball, H. S. M. Coxeter: Mathematical Recreations and Essays, New York: Dover, 1987
  • L. E. Dickson: "Rational Right Triangles", ch. 4 in History of the Theory of numbers, vol. II, Dover Publications 2005
  • W. Sierpinski: Pythagorean Triangles, Mineola, NY, Dover Publications, Inc, 2003

Crossrefs

Extensions

More terms from Zak Seidov, Apr 04 2010

A266965 Primes of the form p = a^2 + b^2 where |a^2 - b^2| is composite.

Original entry on oeis.org

17, 29, 37, 41, 53, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617, 641, 653, 661, 673, 677, 701, 709
Offset: 1

Views

Author

Altug Alkan, Jan 07 2016

Keywords

Comments

Inspired by A266954.
A266954 is a subsequence.
A067756 lists primes of the form p = a^2 + b^2 where |a^2 - b^2| is prime. So union of 2, A067756 and this sequence gives A002313. 2 is an exception because 1^2 - 1^2 = 0 is not prime or composite.

Examples

			17 is a term because 4^2 + 1^2 = 17 is prime and 4^2 - 1^2 = 15 is composite.
29 is a term because 5^2 + 2^2 = 29 is prime and 5^2 - 2^2 = 21 is composite.
37 is a term because 6^2 + 1^2 = 37 is prime and 6^2 - 1^2 = 35 is composite.
		

Crossrefs

Programs

  • Mathematica
    lim = 50; Take[Select[Union@ Flatten@ Table[If[CompositeQ[Abs[a^2 - b^2]], a^2 + b^2, Nothing], {a, lim}, {b, lim}], PrimeQ], 56] (* Michael De Vlieger, Jan 07 2016 *)
  • PARI
    is(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
    f(p) = my(s=lift(sqrt(Mod(-1, p))), x=p, t); if(s>p/2, s=p-s); while(s^2>p, t=s; s=x%s; x=t); s;
    forprime(p=3, 1e3, if(is(p) && !isprime(2*f(p)^2-p), print1(p, ", ")));
    
  • PARI
    list(lim) = my(v=List(), t); lim\=1; for(x=2, sqrtint(lim), for(y=1, min(sqrtint(lim-x^2), x), if(isprime(t=x^2+y^2) && !isprime(x^2-y^2), listput(v, t)))); vecsort(Vec(v), , 8)
Previous Showing 11-18 of 18 results.