OFFSET
2,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 2..1000
Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
Index entries for linear recurrences with constant coefficients, signature (11,-11,11,-11,11,-10).
FORMULA
a(n) = 10^n - floor(10^n/3) - floor(10^n/70) + floor(10^n/210).
From Chai Wah Wu, May 09 2025: (Start)
a(n) = 11*a(n-1) - 11*a(n-2) + 11*a(n-3) - 11*a(n-4) + 11*a(n-5) - 10*a(n-6) for n > 7.
G.f.: x^2*(-70*x^5 + 69*x^4 - 76*x^3 + 71*x^2 - 69*x + 66)/((x - 1)*(10*x - 1)*(x^2 - x + 1)*(x^2 + x + 1)). (End)
EXAMPLE
a(6) = 10^6 - floor(10^6/3) - floor(10^6/70) + floor(10^6/210) = 1000000 - floor(333333.333...) - floor(14285.714...) + floor(4761.904...) = 1000000 - 333333 - 14285 + 4761 = 657143. - Jon E. Schoenfield, Nov 18 2018
MAPLE
a := n->10^n-floor(10^n/3)-floor(10^n/70)+floor(10^n/210);
MATHEMATICA
Table[With[{c=10^n}, c-Floor[c/3]-Floor[c/70]+Floor[c/210]], {n, 2, 20}] (* Harvey P. Dale, Jun 22 2022 *)
PROG
(Magma) [10^n-Floor(10^n/3)-Floor(10^n/70)+Floor(10^n/210): n in [2..20]]; // Vincenzo Librandi, Oct 02 2011
(PARI) a(n)=10^n-10^n\3-10^n\70+10^n\210 \\ Charles R Greathouse IV, Jun 03 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Milan Janjic, Apr 28 2007
STATUS
approved
