A337842 The smallest palindrome with exactly n circular loops (or holes) in its decimal representation.
1, 0, 8, 606, 88, 808, 888, 68086, 8888, 88088, 88888, 6880886, 888888, 8880888, 8888888, 688808886, 88888888, 888808888, 888888888, 68888088886, 8888888888, 88888088888, 88888888888, 6888880888886, 888888888888, 8888880888888, 8888888888888, 688888808888886
Offset: 0
Examples
a(3) = 606 because 6 and 0 have each one circular loop for a total of 3.
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for sequences related to holes in digits
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,111,0,0,0,-1110,0,0,0,1000).
Programs
-
Mathematica
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 *) 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 *)
Formula
Extensions
More terms from Amiram Eldar, Sep 25 2020
Comments