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.

A064370 Zero, together with positive numbers k such that prime(k) - k is a square.

This page as a plain text file.
%I A064370 #35 Apr 16 2024 16:05:47
%S A064370 0,1,2,12,100,118,152,190,212,258,352,462,690,741,1285,1396,1417,2119,
%T A064370 2318,2603,3370,3777,4073,4155,4485,4522,4600,4719,5317,5446,6697,
%U A064370 6748,6985,7144,7595,9492,9551,12010,12985,13438,13850,14672,14739,16510
%N A064370 Zero, together with positive numbers k such that prime(k) - k is a square.
%H A064370 David A. Corneth, <a href="/A064370/b064370.txt">Table of n, a(n) for n = 1..7110</a> (first 300 terms from Harry J. Smith, terms 301..1000 from Zak Seidov)
%t A064370 Join[{0}, Select[Range[50000], IntegerQ[Sqrt[Prime[#] - #]] &]] (* _Paolo Xausa_, Apr 16 2024 *)
%o A064370 (PARI) j=[]; for(n=0,20000, if(n==0 || issquare(prime(n)-n), j=concat(j,n))); j
%o A064370 (PARI) { n=0; default(primelimit, 20000000); for (m=0, 10^9, if (m==0 || issquare(prime(m) - m), write("b064370.txt", n++, " ", m); if (n==300, break)) ) } \\ _Harry J. Smith_, Sep 13 2009
%o A064370 (PARI)
%o A064370 upto(n) = {
%o A064370 	my(t = 0, res = List(0));
%o A064370 	forprime(p = 2, oo,
%o A064370 		t++;
%o A064370 		if(t > n, return(res));
%o A064370 		if(issquare(p-t),
%o A064370 			listput(res, t)
%o A064370 		);
%o A064370 	);
%o A064370 } \\ _David A. Corneth_, Apr 16 2024
%K A064370 nonn
%O A064370 1,3
%A A064370 _Jason Earls_, Sep 26 2001
%E A064370 Edited by _Harry J. Smith_ and _N. J. A. Sloane_, Sep 13 2009