A175884 Numbers that are congruent to {0, 2, 4, 7, 9} mod 12.
0, 2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 26, 28, 31, 33, 36, 38, 40, 43, 45, 48, 50, 52, 55, 57, 60, 62, 64, 67, 69, 72, 74, 76, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 105, 108, 110, 112, 115, 117, 120, 122, 124, 127, 129, 132, 134, 136, 139, 141, 144, 146, 148, 151
Offset: 1
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).
Programs
-
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
-
Magma
[Floor(12*(n-1)/5): n in [1..100]]; // G. C. Greubel, Oct 23 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 *)
-
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
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
Extensions
Offset change by G. C. Greubel, Oct 23 2018
Comments