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.

A064397 Numbers k such that prime(k) + prime(k+1) is a square.

Original entry on oeis.org

7, 15, 20, 61, 152, 190, 293, 377, 492, 558, 789, 919, 942, 1768, 2343, 2429, 2693, 2952, 3136, 3720, 4837, 5421, 5722, 6870, 7347, 8126, 8193, 9465, 9857, 9927, 10410, 10483, 10653, 12685, 13763, 13955, 16033, 16342, 17859, 18367, 18474
Offset: 1

Views

Author

Jason Earls, Sep 29 2001

Keywords

Examples

			For k=15: prime(15) = 47 and prime(16) = 53, 47 + 53 = 100 = 10^2.
		

Crossrefs

Cf. A061275 (the primes), A062703 (squares), A074924 (square root of sum), A000720.
Cf. A076305 (3 primes), A072849 (4 primes), A166255 (70 primes), A166261 (120 primes).

Programs

  • Magma
    [n: n in [0..50000]| IsSquare(NthPrime(n) +NthPrime(n+1))]; // Vincenzo Librandi, Apr 06 2011
  • Mathematica
    lst={};Do[p1=Prime[n];p2=Prime[n+1];q=(p1+p2)^0.5;If[q==IntegerPart[q], AppendTo[lst, n]], {n, 1, 9!}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 02 2008 *)
  • PARI
    j=[]; for(n=1,30000,x=prime(n)+prime(n+1); if(issquare(x),j=concat(j,n))); j
    
  • PARI
    { n=0; default(primelimit, 8500000); for (m=1, 10^9, if (issquare(prime(m) + prime(m + 1)), write("b064397.txt", n++, " ", m); if (n==175, break)) ) } \\ Harry J. Smith, Sep 13 2009
    

Formula

a(n) = A000720(A061275(n)). - Amiram Eldar, Jun 28 2024
a(n) >> n^2/log^2 n. - Charles R Greathouse IV, Mar 08 2025