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!)
A308776 Counterclockwise square spiral of distinct positive integers constructed by greedy algorithm, such that for k = 1..5, every term equal to k mod 5 (except k itself) is vertically or horizontally adjacent to a cell already holding a value equal to k mod 5. 1

%I #13 Jun 25 2019 01:40:19

%S 1,2,3,4,5,6,11,16,7,12,17,8,13,18,9,10,15,20,21,26,31,36,41,22,27,32,

%T 37,42,23,28,33,38,43,14,19,24,29,25,30,35,40,45,50,46,51,56,47,52,57,

%U 62,67,72,77,48,53,58,63,68,73,78,34,39,44,49,54,59,55

%N Counterclockwise square spiral of distinct positive integers constructed by greedy algorithm, such that for k = 1..5, every term equal to k mod 5 (except k itself) is vertically or horizontally adjacent to a cell already holding a value equal to k mod 5.

%C For k = 1..5, let M_k be the set of lattice points with a value equal to k mod 5; the sets M_1, ..., M_5 form 5 arms that spiral around the origin (see representation in Links section). As a consequence, the sequence alternates runs of terms in arithmetic progression with first difference 5.

%C This sequence appears to be a permutation of the natural numbers.

%C This sequence has similarities with A308505.

%H Rémy Sigrist, <a href="/A308776/b308776.txt">Table of n, a(n) for n = 1..10201</a>

%H Rémy Sigrist, <a href="/A308776/a308776.png">Colored representation of the spiral for -500 <= x <= 500 and -500 <= y <= 500</a> (where the color is function of a(n) mod 5)

%H Rémy Sigrist, <a href="/A308776/a308776_1.png">Colored scatterplot of (n, a(n)-n) for n = 1..40401</a> (where the color is function of a(n) mod 5)

%H Rémy Sigrist, <a href="/A308776/a308776.gp.txt">PARI program for A308776</a>

%e The spiral begins:

%e 89---84---79---74---69---64--123--118--113--108--103

%e | |

%e 94 54---49---44---39---34---78---73---68---63 98

%e | | | |

%e 99 59 29---24---19---14---43---38---33 58 93

%e | | | | | |

%e 95 55 25 15---10----9---18---13 28 53 88

%e | | | | | | | |

%e 100 60 30 20 5----4----3 8 23 48 83

%e | | | | | | | | | |

%e 105 65 35 21 6 1----2 17 42 77 112

%e | | | | | | | | |

%e 110 70 40 26 11---16----7---12 37 72 107

%e | | | | | | |

%e 115 75 45 31---36---41---22---27---32 67 102

%e | | | | |

%e 120 80 50---46---51---56---47---52---57---62 97

%e | | |

%e 125 85---90---61---66---71---76---81---82---87---92

%e |

%e 130--135--140---86---91---96--101--106--111--116--117

%o (PARI) See Links section.

%Y Cf. A010874, A308505.

%K nonn

%O 1,2

%A _Rémy Sigrist_, Jun 24 2019

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 September 9 21:41 EDT 2024. Contains 375765 sequences. (Running on oeis4.)