A204454 Odd numbers not divisible by 11.
1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 123, 125, 127, 129, 131
Offset: 1
Examples
2*floor((n-6)/10), n>=0, is the sequence (the exponent of a number indicates how many times this number appears consecutively): (-2)^6 0^10 2^10 4^10 ... By adding these numbers to 2*n+1, n>=0, one obtains -1 for n=0 and a(n) for n>=1. The o.g.f is computed from this sum, but adjusted such that one obtains a vanishing a(0). Recurrences: 31 = a(15) = a(5) + 2*11 = 9 + 22. a(15) = a(14) + a(5) - a(4) = 29 + 9 - 7 = 31. - _Wolfdieter Lang_, Jan 27 2012
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,1,-1).
Programs
-
Mathematica
Complement[Range[1, 131, 2], 11Range[11]] (* Alonso del Arte, Jan 24 2012 *)
-
PARI
a(n)=2*n+(n-6)\10*2+1 \\ Charles R Greathouse IV, Jan 24 2012
Formula
a(n) = 2*n+1 + 2*floor((n-6)/10), n>=1. Note that this is -1 for n=0, but the following o.g.f. uses a(0)=0.
O.g.f: x*(1+2*x+2*x^2+2*x^3+2*x^4+4*x^5+2*x^6+2*x^7+2*x^8+2*x^9+x^10)/((1-x^10)*(1-x)). See the comment above for p=11.
a(n) = n + sum(floor((n+9-k)/10),k=1..4) + 3*floor((n+4)/10) + sum(floor((n+4-k)/10),k=1..5) = n + (n-1) + 2*floor((n+4)/10), n>=1. See the line m=5, p=11 of the array A204456, and the general formula given in a comment above. - Wolfdieter Lang, Jan 26 2012
Recurrences: a(n) = a(n-10) + 2*11. First differences: a(n) = a(n-1) + a(n-10) - a(n-11), n>=11, and inputs a(p;0):=-1 ( here not 0) and a(p;k) for k=1,...,10. See the general comment above. - Wolfdieter Lang, Jan 27 2012
Comments