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 A308412 #90 Feb 16 2025 08:33:55 %S A308412 3,5,7,9,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48, %T A308412 52,54,60,62,68,70,76,78,82,84,88,90,92,94,98,100,102,104,108,110,112, %U A308412 114,118,120,122,126,128,132,134,138,140,144,146,150,152,156,158 %N A308412 Indices of Gaussian primes on a square spiral. %C A308412 These are the numbers k > 0 such that A174344(k) + i*A274923(k) is a Gaussian prime (where i denotes the imaginary unit). %C A308412 For symmetry reasons, we obtain the same sequence when considering a clockwise or a counterclockwise square spiral, or when initially moving towards any unit direction. %C A308412 All terms except the first four are even. %H A308412 Robert Israel, <a href="/A308412/b308412.txt">Table of n, a(n) for n = 1..10000</a> %H A308412 Rémy Sigrist, <a href="/A308412/a308412_1.gp.txt">PARI program for A308412</a> %H A308412 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GaussianPrime.html">Gaussian Prime</a> %e A308412 The first terms displayed on the center of a counterclockwise square spiral are: %e A308412 y\x| -5 -4 -3 -2 -1 0 +1 +2 +3 +4 +5 %e A308412 ---+-------------------------------------------------------- %e A308412 +5| *--100----*---98----*----*----*---94----*---92----* %e A308412 | | | %e A308412 +4| 102 *----*----*---62----*---60----*----*----* 90 %e A308412 | | | | | %e A308412 +3| * * *---36----*---34----*---32----* * * %e A308412 | | | | | | | %e A308412 +2| 104 * 38 *---16----*---14----* 30 * 88 %e A308412 | | | | | | | | | %e A308412 +1| * 68 * 18 5----*----3 12 * 54 * %e A308412 | | | | | | | | | | | %e A308412 0| * * 40 * * *----* * 28 * * %e A308412 | | | | | | | | | | %e A308412 -1| * 70 * 20 7----*----9---10 * 52 * %e A308412 | | | | | | | | %e A308412 -2| 108 * 42 *---22----*---24----*---26 * 84 %e A308412 | | | | | | %e A308412 -3| * * *---44----*---46----*---48----*----* * %e A308412 | | | | %e A308412 4| 110 *----*----*---76----*---78----*----*----*---82 %e A308412 | | %e A308412 5| *--112----*--114----*----*----*--118----*--120----* %p A308412 SP:= proc(n) option remember; local k; %p A308412 k:=floor(sqrt(4*n-7)) mod 4; %p A308412 procname(n-1) -I*exp(I*k*Pi/2) %p A308412 end proc: %p A308412 SP(1):= 0: %p A308412 select(i -> GaussInt:-GIprime(SP(i)), [$1..1000]); # _Robert Israel_, May 20 2024 %o A308412 (PARI) \\ See Links section. %Y A308412 Cf. A174344, A274923. %K A308412 nonn %O A308412 1,1 %A A308412 _Rémy Sigrist_, Jun 01 2019