cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A259013 a(n) is the smallest number of grains of sand placed at the center square of a (2n-1) X (2n-1) table so that some grains drop off the table by the end of the diffusion process.

This page as a plain text file.
%I A259013 #32 Mar 23 2019 20:36:35
%S A259013 4,16,44,88,144,208,320,408,512,672,788,948,1096,1288,1552,1768,1960,
%T A259013 2208,2456,2708,3028,3384,3648,3964,4348,4728,5076,5448,5884,6308,
%U A259013 6708,7176,7644,8240,8664,9132,9764,10276,10816,11404,11992,12516,13264,13816,14388
%N A259013 a(n) is the smallest number of grains of sand placed at the center square of a (2n-1) X (2n-1) table so that some grains drop off the table by the end of the diffusion process.
%C A259013 The diffusion rule is that if a square has more than 3 grains of sand then it loses 4 grains and each neighbor's number of grains increases by one. Initially the center square has a(n) sand grains and all other squares are empty. The final distribution of sand grains and the number a(n) do not depend on the order of the diffusion process. For this reason, it is called an "abelian sandpile model".
%H A259013 Scott R. Shannon, <a href="/A259013/b259013.txt">Table of n, a(n) for n = 1..1000</a>
%H A259013 Wikipedia. <a href="https://en.wikipedia.org/wiki/Abelian_sandpile_model">Abelian Sandpile Model</a>
%o A259013 (MATLAB)
%o A259013 % S(k) gives the minimum number of grains of sand needed at the center
%o A259013 % of a (2n-1) X (2n-1) square table for some grains to drop off
%o A259013 % the table in an "abelian sandpile model".
%o A259013 firstsand=zeros(1,49);
%o A259013 S=zeros(1,49);
%o A259013 n=50;
%o A259013 lim=2*n-1;
%o A259013 A=zeros(lim,lim);
%o A259013 for j=1:17128;
%o A259013     A(n,n)= A(n,n)+1;
%o A259013     while max(max(A))>=4
%o A259013         for xi=1:lim
%o A259013             for yi=1:lim
%o A259013                 if A(xi,yi) >= 4
%o A259013                     A(xi,yi)= A(xi,yi) - 4;
%o A259013                     A(xi+1,yi)=A(xi+1,yi) + 1;
%o A259013                     A(xi,yi+1)=A(xi,yi+1) + 1;
%o A259013                     A(xi-1,yi)=A(xi-1,yi) + 1;
%o A259013                     A(xi,yi-1)=A(xi,yi-1) + 1;
%o A259013                 end
%o A259013             end
%o A259013         end
%o A259013     end
%o A259013     for k=1:n-1
%o A259013         if A(n,n+k)==1 && firstsand(k)==0
%o A259013         firstsand(k)=1;
%o A259013         S(k)=j;
%o A259013         end
%o A259013     end
%o A259013 end
%K A259013 nonn
%O A259013 1,1
%A A259013 _Sezai ATA_, Jun 16 2015
%E A259013 a(21)-a(45) from _Giovanni Resta_, Jun 17 2015