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”).

a(0) = 0; for n > 0, a(n) is the largest distance squared on a square spiral between a(n-1) and any previous occurrence of a(n-1). If a(n-1) has not previously occurred then a(n) = 0.
2

%I #31 Feb 12 2024 08:38:27

%S 0,0,1,0,2,0,4,0,4,4,9,0,10,0,10,4,18,0,16,0,20,0,20,4,20,16,29,0,26,

%T 0,34,0,34,4,26,20,41,0,40,0,40,4,34,72,0,45,0,41,61,0,74,0,58,0,50,0,

%U 61,50,5,0,58,32,0,85,0,113,0,89,0,73,0,89,16,53,0,85,68,0,89,61,65,0,145,0

%N a(0) = 0; for n > 0, a(n) is the largest distance squared on a square spiral between a(n-1) and any previous occurrence of a(n-1). If a(n-1) has not previously occurred then a(n) = 0.

%H Scott R. Shannon, <a href="/A365344/b365344.txt">Table of n, a(n) for n = 0..10000</a>

%e The spiral begins:

%e .

%e 41--20--26--4---34--0---34 .

%e | | .

%e 0 18--4---10--0---10 0 50

%e | | | | |

%e 40 0 2---0---1 0 26 0

%e | | | | | | |

%e 0 16 0 0---0 9 0 58

%e | | | | | |

%e 40 0 4---0---4---4 29 0

%e | | | |

%e 4 20--0---20--4---20--16 74

%e | |

%e 34--72--0---45--0---41--61--0

%e .

%e .

%e a(4) = 2 as a(3) = 0 and the largest square distance between a(3) and a previous occurrence of 0 is 2 - between a(3) and a(1).

%e a(47) = 41 as a(46) = 0 and the largest square distance between a(46) and a previous occurrence of 0 is 41 - between a(46) and a(37). This is the first term to differ from A365343.

%Y Cf. A366543, A366353, A366354, A001481.

%K nonn

%O 0,5

%A _Scott R. Shannon_, Oct 16 2023