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 A284346 #44 Feb 16 2025 08:33:43 %S A284346 2,1,8,1,4,1,2,3,16,3,6,7,8,1,4,1,22,5,6,3,4,17,18,5,4,1,32,5,10,29,4, %T A284346 27,8,15,18,1,2,15,10,3,4,247,8,15,14,19,22,35,6,19,4,27,10,11,8,1,2, %U A284346 5,40,13,44,127,58,61,28,1,22,13,10,19,6,7,8,15,4,9 %N A284346 a(n) is the least positive integer such that n^2 + a(n)^2 and (n + 1)^2 + (a(n) + 1)^2 are primes. %C A284346 n is odd iff a(n) is even. %H A284346 Lars-Erik Svahn, <a href="/A284346/b284346.txt">Table of n, a(n) for n = 1..10000</a> %H A284346 Lars-Erik Svahn, <a href="https://github.com/Lehs/ANS-Forth-libraries">numbertheory.4th</a> %H A284346 Akshaa Vatwani, <a href="http://dx.doi.org/10.1016/j.jnt.2016.07.008">Bounded gaps between Gaussian primes</a>, Journal of Number Theory, Volume 171, February 2017, Pages 449-473. %H A284346 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GaussianPrime.html">Gaussian Prime</a>. %H A284346 <a href="/index/Ga#gaussians">Index entries for Gaussian integers and primes</a>. %e A284346 a(1)=2 since (1 + 1)^2 + (1 + 1)^2 is not prime, but 1^2 + 2^2 = 5 and (1 + 1)^2 + (2 + 1)^2 = 13 are prime. %t A284346 Rest@ FoldList[Module[{k = 1}, While[Times @@ Boole@ Map[PrimeQ, {#2^2 + k^2, (#2 + 1)^2 + (k + 1)^2}] < 1, k++]; k] &, 1, Range@ 76] (* _Michael De Vlieger_, Mar 25 2017 *) %o A284346 (ANS-Forth) %o A284346 s" numbertheory.4th" included %o A284346 : Gauss_twin \ n -- a(n) %o A284346 locals| n | 0 %o A284346 begin 1+ dup dup * n dup * + isprime %o A284346 over 1+ dup * n 1+ dup * + isprime and %o A284346 until ; %o A284346 (PARI) a(n) = my(k=0); while (! (isprime(n^2+k^2) && isprime((n+1)^2+(k+1)^2)), k++); k; \\ _Michel Marcus_, Mar 25 2017 %Y A284346 Cf. A069003, A284211, A284327. %K A284346 nonn %O A284346 1,1 %A A284346 _Lars-Erik Svahn_, Mar 25 2017