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!)
A299207 Length of longest run of primes in any of the four diagonals starting from the center of a square number spiral with prime(n) at the center. 2

%I #29 Apr 20 2018 11:39:51

%S 0,2,3,6,5,2,8,1,4,3,1,8,20,4,3,2,13,1,7,4,1,1,2,3,2,7,1,4,1,0,1,3,6,

%T 0,7,1,1,19,1,2,2,0,4,1,1,0,0,2,8,1,12,3,0,3,2,2,5,1,3,4,0,0,1,7,1,0,

%U 1,0,8,1,2,2,1,1,1,1,1,1,1,0,3,0,7,1,1

%N Length of longest run of primes in any of the four diagonals starting from the center of a square number spiral with prime(n) at the center.

%H Robert Price, <a href="/A299207/b299207.txt">Table of n, a(n) for n = 1..10000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Ulam_spiral">Ulam spiral</a>

%H <a href="/index/Sp">Index entries for sequences related to spirals</a>

%e For n=1:

%e +------------------------+

%e | 18 17 16 15 14 |

%e | +--------------+ |

%e | 19 | 6 5 4 | 13 |

%e | | +----+ | |

%e | 20 | 7 | 2 3 | 12 |

%e | | +---------+ |

%e | 21 | 8 9 10 11 |

%e | +-------------------+

%e | 22 23 24 25 26

%e +-------------------------

%e None of the four numbers located on the diagonals in NE, NW, SW or SE direction are prime, so a(1) = 0.

%e .

%e For n=2:

%e +----------------------------------+

%e | 39 38 37 36 35 34 33 |

%e | +------------------------+ |

%e | 40 | 19 18 17 16 15 | 32 |

%e | | +--------------+ | |

%e | 41 | 20 | 7 6 5 | 14 | 31 |

%e | | | +---+ | | |

%e | 42 | 21 | 8 | 3 4 | 13 | 30 |

%e | | | +--------+ | |

%e | 43 | 22 | 9 10 11 12 | 29 |

%e | | +-------------------+ |

%e | 44 | 23 24 25 26 27 28 |

%e | +-----------------------------+

%e | 45 46 47 48 49 50 51

%e +-----------------------------------

%e The encountered primes are 5 in NE direction, 7, 19, in NW direction and 11 in SE direction, so a(2) = 2.

%e .

%e For n=3:

%e +--------------------------------------------+

%e | 69 68 67 66 65 64 63 62 61 |

%e | +----------------------------------+ |

%e | 70 | 41 40 39 38 37 36 35 | 60 |

%e | | +------------------------+ | |

%e | 71 | 42 | 21 20 19 18 17 | 34 | 59 |

%e | | | +--------------+ | | |

%e | 72 | 43 | 22 | 9 8 7 | 16 | 33 | 58 |

%e | | | | +----+ | | | |

%e | 73 | 44 | 23 | 10 | 5 6 | 15 | 32 | 57 |

%e | | | | +---------+ | | |

%e | 74 | 45 | 24 | 11 12 13 14 | 31 | 56 |

%e | | | +-------------------+ | |

%e | 75 | 46 | 25 26 27 28 29 30 | 55 |

%e | | +-----------------------------+ |

%e | 76 | 47 48 49 50 51 52 53 54 |

%e | +---------------------------------------+

%e | 77 78 79 80 81 82 83 84 85

%e +---------------------------------------------

%e The encountered primes are 7, 17 in NE direction, 11 in SW direction and 13, 29, 53 in SE direction, so a(3) = 3.

%Y Cf. A215471.

%K nonn

%O 1,2

%A _Felix Fröhlich_, Feb 05 2018

%E Corrected a(3) and diagram for n=3. - _Robert Price_, Apr 02 2018

%E a(11)-a(85) from _Robert Price_, Apr 02 2018

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 April 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)