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.

A075555 Smallest prime p such that p+n is a square, or 0 if no such p exists.

This page as a plain text file.
%I A075555 #12 Feb 16 2025 08:32:47
%S A075555 3,2,13,5,11,3,2,17,7,71,5,13,3,2,181,0,19,7,17,5,43,3,2,97,11,23,37,
%T A075555 53,7,19,5,17,3,2,29,13,107,11,61,41,23,7,101,5,19,3,2,73,0,31,13,29,
%U A075555 11,67,89,113,7,23,5,61,3,2,37,17,79,103,257,13,31,11,29,97,71,7,181,5
%N A075555 Smallest prime p such that p+n is a square, or 0 if no such p exists.
%C A075555 If n=A047845(i)^2 for some i, i.e. if n has the form ((k-1)/2)^2 with k odd but not prime, then a(n)=0. It is conjectured that these are the only values of n for which a(n)=0; this would follow from Schinzel's hypothesis.
%H A075555 T. D. Noe, <a href="/A075555/b075555.txt">Table of n, a(n) for n = 1..10000</a>
%H A075555 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SchinzelsHypothesis.html">Schinzel's Hypothesis.</a>
%e A075555 a(8) = 17 because 8 + 17 is the first square that can be made by adding a prime to 8.
%e A075555 a(16) = 0 because 16 + p cannot be x^2, since then p = x^2 - 16 = (x-4)(x+4).
%t A075555 a[n_] := If[IntegerQ[s=Sqrt[n]]&&!PrimeQ[2s+1], 0, For[x=Ceiling[s], True, x++, If[PrimeQ[x^2-n], Return[x^2-n]]]]
%o A075555 (PARI) for(n=1,100,f=0:forprime(p=2,10^7,if(issquare(p+n),f=p:break)): if(f,print1(f","),print1("0,")))
%Y A075555 Cf. A075556.
%Y A075555 a(n) = A105016(n)^2 - n, if a(n) exists.
%K A075555 nonn
%O A075555 1,1
%A A075555 _Amarnath Murthy_, Sep 23 2002
%E A075555 More terms from _Ralf Stephan_, Mar 28 2003
%E A075555 Edited by _Dean Hickerson_, Mar 31 2003