A383595 a(n) is the smallest prime k such that (prime(n), k, u, v) are the vertices of a square in Ulam's spiral, where k < u < v are all primes; or -1 if there is no such k.
-1, -1, -1, 56527, 59, 67, 251, -1, -1, 2473, 3001, 43, 43, 41, 173, 1621, 61, 59, 13, 141937, 13, 13, 10459, 331, 33211, 643, 179, 41, 41, 1429, 11, 11, 59, 59, 13, 127, 163, 157, 169957, 47, 103, 56519, 683, 2843, 6841, 211, 199, 311, 59407, 439, 11, 137, 274831
Offset: 1
Keywords
Examples
For A000040(5) = 11, it is observed that 11 together with 127, 131 and 59 are the vertices of a square whose center is 55. And this is the smallest square of prime vertices that has 11 as one of its vertices. Since 59 is the smallest number between 127, 131 and 59, then a(5) = 59. . . . . . —11-28-53-86-127— —12-29-54-87-128— —13-30-55-88-129— —32-31-56-89-130— —59-58-57-90-131— . . . . .
Comments