OFFSET
1,2
COMMENTS
Key-numbers of the pitches of a major pentatonic scale on a standard chromatic keyboard, with root = 0.
The pentatonic scale can also be obtained by omitting the 4th and 7th notes from the diatonic scale, so a(n) = A083026(A032796(n)). - Federico Provvedi, Sep 10 2022
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Vincenzo Librandi)
Wikipedia, Major pentatonic scale
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
G.f.: x^2*(2 + 2*x + 3*x^2 + 2*x^3 + 3*x^4) / ((x^4 + x^3 + x^2 + x + 1)*(x-1)^2). - R. J. Mathar, Jul 10 2015
a(n) = 2*n - 1 + floor((n-4)/5) + floor((n-1)/5). - Federico Provvedi, Jan 13 2018
a(n) = floor(12*(n-1)/5). - Federico Provvedi, Oct 19 2018
MAPLE
seq(floor(12*(n-1)/5), n=1..65); # Muniru A Asiru, Oct 24 2018
MATHEMATICA
fQ[n_] := MemberQ[{0, 2, 4, 7, 9}, Mod[n, 12]]; Select[ Range[0, 152], fQ] (* Robert G. Wilson v, Oct 09 2010 *)
Table[2n-1+Floor[(n-4)/5]+Floor[(n-1)/5], {n, 100}] (* Federico Provvedi, Jan 13 2018 *)
Quotient[12(Range[100]-1), 5] (* Federico Provvedi, Oct 19 2018 *)
PROG
(PARI) a(n)=([0, 1, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0; 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 1, 0; 0, 0, 0, 0, 0, 1; -1, 1, 0, 0, 0, 1]^n*[0; 2; 4; 7; 9; 12])[1, 1] \\ for offset 0; Charles R Greathouse IV, Jul 06 2017
(PARI) vector(100, n, floor(12*(n-1)/5)) \\ G. C. Greubel, Oct 23 2018
(Magma) [Floor(12*(n-1)/5): n in [1..100]]; // G. C. Greubel, Oct 23 2018
(GAP) Filtered([0..151], n->n mod 12 = 0 or n mod 12 = 2 or n mod 12 = 4 or n mod 12 = 7 or n mod 12 = 9); # Muniru A Asiru, Oct 24 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bill Shillito (DMAshura(AT)gmail.com), Oct 08 2010
EXTENSIONS
Offset change by G. C. Greubel, Oct 23 2018
STATUS
approved