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 21-22 of 22 results.

A097431 Integer part of the hypotenuse of right triangles with consecutive prime legs.

Original entry on oeis.org

3, 5, 8, 13, 17, 21, 25, 29, 37, 42, 48, 55, 59, 63, 70, 79, 84, 90, 97, 101, 107, 114, 121, 131, 140, 144, 148, 152, 157, 169, 182, 189, 195, 203, 212, 217, 226, 233, 240, 248, 254, 263, 271, 275, 280, 290, 307, 318, 322, 326, 333, 339, 347, 359, 367, 376, 381
Offset: 1

Views

Author

Cino Hilliard, Aug 22 2004

Keywords

Examples

			If legs = 3,5 then floor(sqrt(9+25)) = 5, the 2nd entry.
		

Crossrefs

Cf. A069484.

Programs

  • Magma
    [Floor(Sqrt(NthPrime(n)^2 + NthPrime(n+1)^2)): n in [1..60]]; // Vincenzo Librandi, Mar 11 2015
  • Mathematica
    Table[Floor[Sqrt[Prime[n]^2 + Prime[n + 1]^2]], {n, 60}] (* Vincenzo Librandi, Mar 11 2015 *)
    Floor[Sqrt[Total[#^2]]]&/@Partition[Prime[Range[60]],2,1] (* Harvey P. Dale, Mar 30 2024 *)
  • PARI
    a(n) = for(j=1,n,x=prime(j);y=prime(j+1);print1(floor(sqrt(x^2+y^2))","))
    

Formula

a(n) = floor(sqrt(prime(n)^2 + prime(n+1)^2)) = floor(sqrt(A069484(n))).

A271050 Positive integer k such that k^2 = p^2 + q^2 - 1 where p and q are consecutive primes.

Original entry on oeis.org

13, 17, 37, 157, 307, 437, 1451, 6487, 60773, 421133, 1445957, 2064493, 15247789, 177075397, 16509255853, 4270704255979, 56635565799013, 124750634536736711, 628179811369719907, 81815870181890275241, 13861061749008806276269, 91566796731172246399571
Offset: 1

Views

Author

Emre APARI, Mar 29 2016

Keywords

Comments

Prime terms of this sequence are listed in A167276. - Altug Alkan, Mar 30 2016

Examples

			         7^2 + 11^2 - 1 = 169 (13^2, k is prime),
        11^2 + 13^2 - 1 = 289 (17^2, k is prime),
        23^2 + 29^2 - 1 = 1369 (37^2, k is prime),
      109^2 + 113^2 - 1 = 24649 (157^2, k is prime),
      211^2 + 223^2 - 1 = 94249 (307^2, k is prime),
      307^2 + 311^2 - 1 = 190969 (437^2, k is semiprime),
    1021^2 + 1031^2 - 1 = 2105401 (1451^2, k is prime),
  42967^2 + 42979^2 - 1 = 3693357529 (60773^2, k is prime).
		

Crossrefs

Cf. A001248, A069484, A160054 (the corresponding primes p), A167276.

Programs

  • Mathematica
    p = 2; q = 3; lst = {}; While[p < 10^15, If[ IntegerQ@ Sqrt[p^2 + q^2 - 1], AppendTo[lst, Sqrt[p^2 + q^2 - 1]];
    Print[Sqrt[p^2 + q^2 - 1]]]; p = q; q = NextPrime@ q] (* Robert G. Wilson v, Mar 30 2016 *)
  • PARI
    list(nn) = {p = 2; forprime(q=3, nn, if (issquare(s = q^2+p^2-1), print1(sqrtint(s), ", ")); p = q;);} \\ Michel Marcus, Mar 29 2016

Extensions

More terms from Jinyuan Wang, Jan 09 2021
Previous Showing 21-22 of 22 results.