login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
Wikipedia, Ulam spiral
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 08:01 EDT 2024. Contains 375510 sequences. (Running on oeis4.)