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.

A157480 a(n) = least prime p such that p + prime(n) is a square.

This page as a plain text file.
%I A157480 #12 Oct 01 2013 21:35:29
%S A157480 2,13,11,2,5,3,19,17,2,7,5,107,23,101,2,11,5,3,257,29,71,2,17,11,3,43,
%T A157480 41,37,467,31,17,13,7,5,47,173,167,1601,2,23,17,719,5,3,59,701,113,2,
%U A157480 29,347,23,17,83,5,67,61,131,53,47,43,41,31,17,13,11,7,569,239,53,227,47,2
%N A157480 a(n) = least prime p such that p + prime(n) is a square.
%H A157480 Zak Seidov, <a href="/A157480/b157480.txt">Table of n, a(n) for n = 1..10000</a>
%e A157480 The difference between prime 3 and the square 16 is 13 which is prime and in the sequence.
%t A157480 Table[p=Prime[n];b=Ceiling[Sqrt[p]];While[!PrimeQ[x=b^2-p],b++];x,{n,72}]
%o A157480 (PARI) g(n)= c=0;forprime(x=2,n,for(k=1,n^2,if(issquare(x+k)&&isprime(k),
%o A157480 print1(k",");c++;break)));c
%K A157480 nonn
%O A157480 1,1
%A A157480 _Cino Hilliard_, Mar 01 2009
%E A157480 Better definition and Mma program from _Zak Seidov_, Mar 14 2013