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.
%I A059844 #17 Jan 01 2024 09:08:23 %S A059844 1,1,4,1,36,1,4,9,4,1,36,1,4,9,4,1,36,1,4,9,16,1,36,49,4,81,4,1,144,1, %T A059844 16,9,4,9,36,1,4,9,4,1,576,1,4,9,16,1,36,25,4,9,16,1,36,25,4,81,4,1, %U A059844 324,1,36,9,4,9,36,1,4,81,4,1,36,1,16,9,4,25,36,1,4,9,16,1,144,25,4,81 %N A059844 a(n) = smallest nonzero square x^2 such that n+x^2 is prime. %C A059844 a(n) = 1 for n in A006093. - _Robert Israel_, Dec 31 2023 %H A059844 Robert Israel, <a href="/A059844/b059844.txt">Table of n, a(n) for n = 1..10000</a> %F A059844 a(n) + n is the smallest prime of the form x^2 + n. %e A059844 a(24) = 49 because 49 + 24 = 73 is prime and 1 + 24 = 25, 4 + 24 = 28, 9 + 24 = 33, 16 + 24 = 40, 25 + 24 = 49, and 36 + 24 = 60 are composite. %p A059844 f:= proc(n) local x; %p A059844 for x from 1 + (n mod 2) by 2 do %p A059844 if isprime(n+x^2) then return x^2 fi; %p A059844 od %p A059844 end proc: %p A059844 f(1):= 1: %p A059844 map(f, [$1..100]); # _Robert Israel_, Dec 31 2023 %t A059844 sqs[n_]:=Module[{q=1},While[!PrimeQ[n+q],q=(Sqrt[q]+1)^2];q]; Array[ sqs,90] (* _Harvey P. Dale_, Aug 11 2017 *) %Y A059844 Cf. A002496, A006093, A056899, A049423, A005473, A056905, A056909. %K A059844 nonn %O A059844 1,3 %A A059844 _Labos Elemer_, Feb 26 2001