A113688 Isolated semiprimes in the semiprime square spiral.
65, 74, 249, 295, 309, 355, 422, 511, 545, 667, 669, 758, 926, 943, 979, 998, 1099, 1167, 1186, 1322, 1457, 1469, 1561, 1585, 1658, 1711, 1774, 1779, 1835, 1891, 1959, 1961, 1963, 2021, 2038, 2066, 2155, 2186, 2191, 2206, 2271, 2329, 2342
Offset: 1
Examples
Spiral example: . 17--16--15--14--13 | | 18 5---4---3 12 | | | | 19 6 1---2 11 | | | 20 7---8---9--10 | 21--22--23--24--25 . From _Michael De Vlieger_, Dec 22 2015: (Start) Spiral including n <= 121 showing only semiprimes; the isolated semiprimes appear in parentheses: . .---.---.---.---.---.--95--94--93---.--91 | | . (65)--.---.--62---.---.---.--58--57 . | | | | . . .---.--35--34--33---.---. . . | | | | | | . . 38 .---.--15--14---. . 55 . | | | | | | | | . . 39 . .---4---. . . . 87 | | | | | | | | | | 106 69 . . 6 .---. . . . 86 | | | | | | | | | . . . . .---.---9--10 . . 85 | | | | | | | . . . 21--22---.---.--25--26 51 . | | | | | . . .---.---.--46---.---.--49---. . | | | . .-(74)--.---.--77---.---.---.---.--82 | 111---.---.---.-115---.---.-118-119---.-121 . (End)
References
- S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..2000
- Alois P. Heinz, Plot of semiprime spiral, containing all semiprimes <= 10000. Isolated semiprimes are colored red.
- M. Stein and S. M. Ulam, An Observation on the Distribution of Primes, Amer. Math. Monthly 74, 43-44, 1967.
- M. Stein and S. M. Ulam and M. B. Wells, A Visual Display of Some Properties of the Distribution of Primes, Amer. Math. Monthly 71, 516-520, 1964.
- Eric Weisstein's World of Mathematics, Prime Spiral.
- Eric Weisstein's World of Mathematics, Semiprime.
Crossrefs
Programs
-
Mathematica
spiral[n_] := Block[{o = 2 n - 1, t, w}, t = Table[0, {o}, {o}]; t = ReplacePart[t, {n, n} -> 1]; Do[w = Partition[Range[(2 (# - 1) - 1)^2 + 1, (2 # - 1)^2], 2 (# - 1)] &@ k; Do[t = ReplacePart[t, {(n + k) - (j + 1), n + (k - 1)} -> #[[1, j]]]; t = ReplacePart[t, {n - (k - 1), (n + k) - (j + 1)} -> #[[2, j]]]; t = ReplacePart[t, {(n - k) + (j + 1), n - (k - 1)} -> #[[3, j]]]; t = ReplacePart[t, {n + (k - 1), (n - k) + (j + 1)} -> #[[4, j]]], {j, 2 (k - 1)}] &@ w, {k, 2, n}]; t]; f[w_] := Block[{d = Dimensions@ w, t, g}, t = Reap[Do[Sow@ Take[#[[k]], {2, First@ d - 1}], {k, 2, Last@ d - 1}]][[-1, 1]] &@ w; g[n_] := If[n != 0, Total@ Join[Take[w[[Last@ # - 1]], {First@ # - 1, First@ # + 1}], {First@ #, Last@ #} &@ Take[w[[Last@ #]], {First@ # - 1, First@ # + 1}], Take[w[[Last@ # + 1]], {First@ # - 1, First@# + 1}]] &@(Reverse@ First@ Position[t, n] + {1, 1}) == 0, False]; Select[Union@ Flatten@ t, g@ # &]]; t = spiral@ 26 /. n_ /; PrimeOmega@ n != 2 -> 0; f@ t (* Michael De Vlieger, Dec 21 2015, Version 10 *)
Extensions
Corrected and extended by Alois P. Heinz, Jan 02 2011
Comments