A291454 Number of half tones between successive pitches in a major scale.
2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1
Offset: 1
Links
- Muniru A Asiru, Table of n, a(n) for n = 1..1000
- Wikipedia, Scale (music)
Programs
-
Magma
[12*(n+1) div 7 - 12*n div 7: n in [1..80]]; // Vincenzo Librandi, Oct 21 2018
-
Maple
a:=proc(n) floor(12*(n+1)/7-floor(12*n/7)) end: seq(a(n),n=1..110); # Muniru A Asiru, Oct 19 2018
-
Mathematica
Table[{2, 2, 1, 2, 2, 2, 1}, 15] // Flatten (* Robert G. Wilson v, Aug 25 2017 *) Table[Floor[12/7 (k + 1)] - Floor[12/7 k], {k, 1, 100}] (* Federico Provvedi,Oct 18 2018 *)
-
PARI
a(n)=[1,2,2,1,2,2,2][n%7+1] \\ Charles R Greathouse IV, Aug 26 2017
Formula
a(n) = floor(12*(n+1)/7) - floor(12*n/7). - Federico Provvedi, Oct 18 2018
Dirichlet g.f.: 2*zeta(s) - 7^(-s)*(zeta(s,3/7) + zeta(s)). - Federico Provvedi, Aug 27 2021
Comments