OFFSET
1,2
COMMENTS
In the game "FizzBuzz", players replace any number divisible by three with the word "Fizz", and any number divisible by five with the word "Buzz". But multiples of both three and five are replaced by "FizzBuzz". For example, 1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, FizzBuzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, FizzBuzz, ...
The asymptotic density of this sequence is 7/15. - Amiram Eldar, Mar 25 2021
For a neat way to supplement the set to achieve equal density with its complement, see A080307. - Peter Munn, Oct 12 2023
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Rosetta Code, FizzBuzz.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
FORMULA
G.f.: -(3*x^8 + 2*x^7 + x^6 + 3*x^5 + x^4 + 2*x^3 + 3*x^2) / (-x^8 + x^7 + x - 1).
a(n) = a(n-1) + a(n-7) - a(n-8) for n > 8. - Colin Barker, Feb 07 2017
MATHEMATICA
Select[Range[0, 200], MemberQ[Mod[#, {3, 5}], 0]&] (* or *) LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 3, 5, 6, 9, 10, 12, 15}, 80] (* Harvey P. Dale, Apr 01 2018 *)
Union[3Range[0, 33], 5Range[20]] (* Alonso del Arte, Sep 03 2018 *)
CoefficientList[Series[-(3*x^7 + 2*x^6 + x^5 + 3*x^4 + x^3 + 2*x^2 + 3*x) / (-x^8 + x^7 + x - 1) , {x, 0, 80}], x] (* Stefano Spezia, Sep 16 2018 *)
PROG
(PARI) concat(0, Vec(x^2*(3 + 2*x + x^2 + 3*x^3 + x^4 + 2*x^5 + 3*x^6) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)) + O(x^100))) \\ Colin Barker, Feb 07 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Jan 29 2017
STATUS
approved