login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A302244
Length of longest run of primes in any of the four diagonals starting from the center of a square number spiral with n at the center.
1
1, 3, 0, 2, 0, 3, 0, 6, 0, 1, 0, 5, 0, 2, 0, 2, 0, 8, 0, 1, 0, 1, 0, 4, 0, 4, 0, 2, 0, 3, 0, 1, 0, 1, 0, 3, 0, 8, 0, 1, 0, 20, 0, 4, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 0, 13, 0, 1, 0, 2, 0, 3, 0, 7, 0, 1, 0, 4, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2
OFFSET
0,2
COMMENTS
As in A299207, the center number is not considered in the run.
Note that a(n)=0 for all even n>0.
EXAMPLE
For n=3:
+-------------------------------+
| 39 38 37 36 35 34 33 |
| +---------------------+ |
| 40 | 19 18 17 16 15 | 32 |
| | +-----------+ | |
| 41 | 20 | 7 6 5 | 14 | 31 |
| | | +---+ | | |
| 42 | 21 | 8 | 3 4 | 13 | 30 |
| | | +-------+ | |
| 43 | 22 | 9 10 11 12 | 29 |
| | +----------------+ |
| 44 | 23 24 25 26 27 28 |
| +--------------------------+
| 45 46 47 48 49 50 51
+--------------------------------
The encountered primes are 7, 19 in the NW direction, 5 in the NE direction and 11 in the SE direction, so a(3) = 2.
CROSSREFS
Sequence in context: A035464 A194669 A364570 * A019746 A112574 A318652
KEYWORD
nonn
AUTHOR
Robert Price, Apr 03 2018
STATUS
approved