%I #24 Oct 06 2019 18:19:48
%S 2,11,19,23,53,61,127,139,151,163,233,281,431,541,613,743,827,977,
%T 1009,1279,1621,1871,2003,2281,2377,2731,3109,3221,3511,3571,3631,
%U 3691,4001,4129,4523,4591,5077,6361,6521,7789,7877,8419,9851,10151,10973,11503,11719,11827,12377,12601,12713,13399
%N Primes on axis of Ulam square spiral (with rows ... / 7 8 9 / 6 1 2 / 5 4 3 / ... ) with origin at (1).
%C Quadrants are numbered clockwise: 4=north, 1=east, 2=south, 3=west. The spiral numbers falling on axes (whether prime or not) are 4=north (2n+1)^2-n, 1=east (2n+1)^2+n+1, 2=south (2n)^2-(n-1), 3=west (2n)^2+n+1.
%C Primes to the left, right, above or below the 1 in the example in A054552.
%C This is the union of the primes in A168022, A168023, A168025 and A168027. - _R. J. Mathar_, Jul 11 2014
%e For n=0, quadrant = 1, a(1) = 2, distance = 1;
%e for n=1, quadrant = 1, a(2) = 11, distance = 2;
%e for n=2, quadrant = 3, a(3) = 19, distance = 2.
%t Select[ Sort@ Flatten@ Table[ 4n^2 + (2j - 3)n + 1, {j, 0, 3}, {n, 58}], PrimeQ] (* _Robert G. Wilson v_, Jul 10 2014 *)
%Y Cf. A054552, A054556, A054567, A033951, A172979.
%K nonn
%O 1,1
%A _Donald S. McDonald_, Jan 10 2003
%E a(12) onward from _Robert G. Wilson v_, Jul 10 2014
|