%I #48 Mar 13 2022 14:11:57
%S 1,0,8,606,88,808,888,68086,8888,88088,88888,6880886,888888,8880888,
%T 8888888,688808886,88888888,888808888,888888888,68888088886,
%U 8888888888,88888088888,88888888888,6888880888886,888888888888,8888880888888,8888888888888,688888808888886
%N The smallest palindrome with exactly n circular loops (or holes) in its decimal representation.
%C The decimal digits 1, 2, 3, 5, 7 have no hole, and 4 is represented without a hole; otherwise, 0, 6, 9 have one hole each and 8 has two holes.
%C Least palindrome q such that A064532(q) = n.
%C Except for a(0) = 1, each term has only digits 0, 6 or 8 in its decimal expansion.
%H Harvey P. Dale, <a href="/A337842/b337842.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Ho#holes">Index entries for sequences related to holes in digits</a>
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,111,0,0,0,-1110,0,0,0,1000).
%F a(2m) = A002282(m) for m >= 1.
%F a(4m+1) = A332180(m) for m >= 1.
%F a(4m+3) = 6 * A000533(2m+2) + 10 * A332180(m) for m >= 0.
%e a(3) = 606 because 6 and 0 have each one circular loop for a total of 3.
%t a[0] = 1; a[n_] := Switch[Mod[n, 4], _?EvenQ, 8*(10^(n/2) - 1)/9, 1, 8*(10^((n + 1)/2) - 9*10^((n - 1)/4) - 1)/9, 3, 8*(10^((n + 3)/2) - 9*10^((n + 1)/4) - 1)/9 - 2*(10^((n + 1)/2) + 1)]; Array[a, 28, 0] (* _Amiram Eldar_, Sep 26 2020 *)
%t LinearRecurrence[{0,0,0,111,0,0,0,-1110,0,0,0,1000},{1,0,8,606,88,808,888,68086,8888,88088,88888,6880886,888888},30] (* _Harvey P. Dale_, Mar 13 2022 *)
%Y Cf. A000533, A002113, A002282, A064532, A332180.
%Y Cf. A331898 (similar for primes).
%K nonn,base,easy
%O 0,3
%A _Bernard Schott_, Sep 25 2020
%E More terms from _Amiram Eldar_, Sep 25 2020