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.

Showing 1-4 of 4 results.

A103739 Primes which are half the sum of 2 squares of primes.

Original entry on oeis.org

17, 29, 37, 73, 89, 97, 109, 149, 157, 193, 229, 241, 269, 277, 349, 409, 433, 541, 601, 661, 709, 769, 829, 853, 929, 937, 1009, 1021, 1069, 1109, 1117, 1129, 1249, 1321, 1409, 1429, 1489, 1549, 1609, 1669, 1753, 1789, 1801, 1873, 2029, 2089, 2161, 2221
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 28 2005

Keywords

Comments

Primes of the form x^2 + y^2, where x > y > 0, such that x-y = p and x+y = q are primes. Proof: (p^2+q^2)/2 = ((x-y)^2+(x+y)^2)/2 = x^2+y^2 so we have x = (p+q)/2 and y = (q-p)/2. - Thomas Ordowski, Sep 24 2012
All terms == 1 or 5 (mod 12). - Thomas Ordowski, Jun 28 2013
Or, primes in A143850. - Zak Seidov, Jun 06 2015

Examples

			17 is in the sequence because (3^2 + 5^2) / 2 = 17.
		

Crossrefs

Intersection of A143850 and A000040.

Programs

  • Maple
    Primes:= select(isprime,[seq(2*i+1,i=1..400)]):
    Psq:= map(`^`,Primes,2):
    M:= max(Psq):
    S:= select(t -> t <= M/2 and isprime(t),{seq(seq((Psq[i]+Psq[j])/2, j=1..i-1),i=1..nops(Psq))}):
    sort(convert(S,list)); # Robert Israel, Jun 08 2015
  • PARI
    list(lim)=my(v=List(), p2, t); lim\=1; if(lim<9, lim=9); forprime(p=3, sqrtint(2*lim-9), p2=p^2; forprime(q=3, min(sqrtint(2*lim-p2), p), if(isprime(t=(p2+q^2)/2), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Feb 14 2017

Extensions

Corrected and extended by Walter Nissen, Jul 19 2005

A075892 Average of squares of successive primes: a(n) = (prime(n+1)^2 + prime(n)^2)/2, with n >= 2.

Original entry on oeis.org

17, 37, 85, 145, 229, 325, 445, 685, 901, 1165, 1525, 1765, 2029, 2509, 3145, 3601, 4105, 4765, 5185, 5785, 6565, 7405, 8665, 9805, 10405, 11029, 11665, 12325, 14449, 16645, 17965, 19045, 20761, 22501, 23725, 25609, 27229, 28909, 30985, 32401
Offset: 2

Views

Author

Zak Seidov, Oct 17 2002

Keywords

Comments

a(n) is prime for n in A240749. - Robert Israel, Jul 06 2017
If p and q are primes such that p > q > 3, then ((p^2 - q^2)/2, p*q, (p^2 + q^2)/2) is a primitive Pythagorean triple. - César Aguilera, Jun 02 2022

Examples

			a(2)=17 because (prime(3)^2 + prime(2)^2)/2 = (5^2 + 3^2)/2 = 17.
		

Crossrefs

Programs

  • Magma
    [(NthPrime(n+1)^2+NthPrime(n)^2)/2: n in [2..50]]; // Vincenzo Librandi, Mar 07 2015
  • Maple
    seq((ithprime(i)^2 + ithprime(i+1)^2)/2, i=2..100); # Robert Israel, Jul 06 2017
  • Mathematica
    Table[(Prime[n + 1]^2 + Prime[n]^2)/2, {n, 2, 50}] (* Vincenzo Librandi, Mar 07 2015 *)
    p=2;q=3;Table[p=q;q=NextPrime[q];(q^2+p^2)/2,{100}] (* Zak Seidov, Jul 06 2017 *)
  • PARI
    a(n) = (prime(n+1)^2+prime(n)^2)/2; \\ Michel Marcus, Oct 03 2013
    

Formula

a(n)^2 = A124434(n)^2 + A006094(n)^2. - César Aguilera, Jun 02 2022

A227697 Numbers of the form ((p^2 + q^2)/2 - 1)/4, where p and q are odd primes.

Original entry on oeis.org

2, 4, 6, 7, 9, 12, 16, 18, 21, 22, 24, 27, 30, 36, 37, 39, 42, 46, 48, 51, 57, 60, 66, 67, 69, 72, 81, 87, 90, 102, 106, 108, 111, 120, 121, 123, 126, 132, 135, 141, 150, 156, 165, 171, 172, 174, 177, 186, 192, 207, 210
Offset: 1

Views

Author

Richard R. Forberg, Sep 22 2013

Keywords

Comments

a(n) mod 3 = 0 if neither prime = 3.
a(n) mod 3 = 1 if one prime = 3.
a(1) mod 3 = 2 (where both primes = 3).

Formula

a(n) = (A143850(n)-1)/4.

A357439 Sums of squares of two odd primes.

Original entry on oeis.org

18, 34, 50, 58, 74, 98, 130, 146, 170, 178, 194, 218, 242, 290, 298, 314, 338, 370, 386, 410, 458, 482, 530, 538, 554, 578, 650, 698, 722, 818, 850, 866, 890, 962, 970, 986, 1010, 1058, 1082, 1130, 1202, 1250, 1322, 1370, 1378, 1394, 1418, 1490, 1538, 1658, 1682
Offset: 1

Views

Author

Giuseppe Melfi, Oct 06 2022

Keywords

Comments

Although this is twice A143850, it is important enough to warrant an entry of it own. - N. J. A. Sloane, Oct 10 2022

Crossrefs

Showing 1-4 of 4 results.