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.

A375874 Number of distinct n X n patterns in the squiral tiling.

This page as a plain text file.
%I A375874 #29 Mar 27 2025 10:09:56
%S A375874 1,2,14,70,126,270,438,630,790,958,1134,1542,1974,2430,2910,3414,3942,
%T A375874 4494,5070,5670,6142,6622,7110,7606,8110,8622,9142,9670,10206,11406,
%U A375874 12630,13878,15150,16446,17766,19110,20478,21870,23286,24726,26190,27678,29190
%N A375874 Number of distinct n X n patterns in the squiral tiling.
%C A375874 The squiral tiling, can be obtained as the limit pattern under the binary block substitution 0 -> [[1,0,1],[0,0,0][1,0,1]] and 1 -> [[0,1,0],[1,1,1][0,1,0]], when starting with the seed 0.
%D A375874 M. Baake, and U. Grimm, Aperiodic Order. Volume 1: A Mathematical Invitation, Encyclopedia of Mathematics and its Applications No. 149 Cambridge University Press, Cambridge (2013).
%D A375874 B. Grünbaum and F. C. Shephard, Tilings and Patterns, W.H. Freeman 1987, MR0857454.
%H A375874 Johan Nilsson, <a href="/A375874/b375874.txt">Table of n, a(n) for n = 0..10000</a>
%H A375874 Tilings Encyclopedia, <a href="https://tilings.math.uni-bielefeld.de/substitution/squiral/">Squiral</a>
%H A375874 Johan Nilsson <a href="https://arxiv.org/abs/2409.09847">The Pattern Complexity of the Squiral Tiling</a>
%F A375874 a(n) = (4 + 8*A - 8*B)*(n - 1)^2 + (12 * 3^A + 24 * 3^B) * (n - 1) - 18 * 9^A, for n>=4 where A = floor(log3(n-2)), B = floor(log3((n-2)/2)), and log3 is the logarithm in base 3.
%F A375874 For n>=2;
%F A375874 a(3*n-2) = 9*a(n),
%F A375874 a(9*n-7) = 5*a(3*n+1) - 16*a(3*n) + 20*a(3*n-1),
%F A375874 a(9*n-4) = - a(3*n+1) + 5*a(3*n) + 5*a(3*n-1),
%F A375874 a(9*n-1) = 2*a(3*n+1) + 8*a(3*n) - a(3*n-1),
%F A375874 a(3*n) = a(3*n-1) + 3*a(n+1) - 3*a(n).
%e A375874 a(1) = 2, since there are 2 different 1X1 patterns in the squiral tiling; namely 0 and 1.
%e A375874 a(2) = 14, since there are 14 different 2X2 patterns in the squiral tiling; namely all 16 2X2 binary matrices except [[0,0],[0,0]] and [[1,1],[1,1]].
%p A375874 a:= n-> `if`(n<3, [1, 2, 14][n+1], ((A, B)-> (4+8*A-8*B)*(n-1)^2+
%p A375874     (12*3^A+24*3^B)*(n-1)-18*9^A)(ilog[3](n-2), ilog[3]((n-2)/2))):
%p A375874 seq(a(n), n=0..42);  # _Alois P. Heinz_, Sep 18 2024
%t A375874 a[n_] := If[n<3, {1, 2, 14}[[n+1]], With[{A = Floor@ Log[3, n-2], B = Floor@ Log[3, (n-2)/2]}, (4+8*A-8*B)*(n-1)^2+(12*3^A+24*3^B)*(n-1)-18*9^A]];
%t A375874 Table[a[n], {n, 0, 42}] (* _Jean-François Alcover_, Mar 27 2025, after _Alois P. Heinz_ *)
%o A375874 (PARI) a(n)=if(n<4, [1,2,14,70][n+1], my(A=logint(n-2,3), B=logint((n-2)\2,3)); (4 + 8*A - 8*B)*(n - 1)^2 + (12 * 3^A + 24 * 3^B) * (n - 1) - 18 * 9^A) \\ _Andrew Howroyd_, Sep 18 2024
%o A375874 (Python)
%o A375874 from sympy import integer_log
%o A375874 def A375874(n):
%o A375874     if n<4: return (1,2,14,70)[n]
%o A375874     a, b = integer_log(n-2,3)[0]+1, integer_log((n>>1)-1,3)[0]+1
%o A375874     return (n-1)*((1+(a-b<<1))*(n-1)+((c:=3**a)+(3**b<<1))<<1)-c**2<<1 # _Chai Wah Wu_, Sep 18 2024
%K A375874 nonn
%O A375874 0,2
%A A375874 _Johan Nilsson_, Sep 01 2024