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!)
A094767 Square spiral of sums of selected preceding terms, starting at 1 (a spiral Fibonacci-like sequence). 5

%I #16 Aug 12 2018 21:27:16

%S 1,1,2,4,8,13,26,40,81,123,205,412,620,1034,2072,3120,5204,8332,16677,

%T 25056,41772,66854,133748,200749,334741,535694,870558,1741321,2612619,

%U 4355177,6968828,11324625,22650284,33978635,56635145,90624176,147267645

%N Square spiral of sums of selected preceding terms, starting at 1 (a spiral Fibonacci-like sequence).

%C Enter 1 into center position of the spiral. Repeat: Add to the number in the present position the numbers in all those already filled positions that are horizontally, vertically or diagonally adjacent to it, go to next position of the spiral and enter the sum into it.

%C a(1) = 1, a(n) = a(n-1) + Sum_{i < n-1 and a(i) is adjacent to a(n-1)} a(i).

%C Here eight positions are considered adjacent, only four however in A094768.

%C Clockwise and counterclockwise construction of the spiral result in the same sequence.

%H Klaus Brockhaus, <a href="/A094767/b094767.txt">Table of n, a(n) for n = 1..729</a>

%e Clockwise constructed spiral begins

%e .

%e 41772---66854--133748--200749--334741

%e |

%e |

%e |

%e 25056 26------40------81-----123

%e | | |

%e | | |

%e | | |

%e 16677 13 1-------1 205

%e | | | |

%e | | | |

%e | | | |

%e 8332 8-------4-------2 412

%e | |

%e | |

%e | |

%e 5204----3120----2072----1034-----620

%e .

%e where

%e a(2) = a(1) = 1,

%e a(3) = a(2) + a(1) = 2,

%e a(4) = a(3) + a(2) + a(1) = 4,

%e a(5) = a(4) + a(3) + a(2) + a(1) = 8,

%e a(6) = a(5) + a(4) + a(1) = 13,

%e a(7) = a(6) + a(5) + a(4) + a(1) = 26.

%o (PARI) {m=5; h=2*m-1; A=matrix(h, h); print1(A[m, m]=1, ","); pj=m; pk=m; T=[[1, 0], [1, -1], [0, -1], [ -1, -1], [ -1, 0], [ -1, 1], [0, 1], [1, 1]]; for(n=1, (h-2)^2-1, g=sqrtint(n); r=(g+g%2)\2; q=4*r^2; d=n-q; if(n<=q-2*r, j=d+3*r; k=r, if(n<=q, j=r; k=-d-r, if(n<=q+2*r, j=r-d; k=-r, j=-r; k=d-3*r))); j=j+m; k=k+m; s=A[pj, pk]; for(c=1, 8, v=[pj, pk]; v+=T[c]; s=s+A[v[1], v[2]]); A[j, k]=s; print1(s, ","); pj=j; pk=k)} \\ _Klaus Brockhaus_, Aug 27 2008

%Y Cf. A063826, A094768, A094769, A126937, A141481.

%K nonn

%O 1,3

%A _Yasutoshi Kohmoto_, Jun 10 2004

%E Edited and extended beyond a(14) by _Klaus Brockhaus_, Aug 27 2008

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 25 16:23 EDT 2024. Contains 371989 sequences. (Running on oeis4.)