OFFSET
1,2
COMMENTS
Numbers not divisible by 3 or 13.
For n from 1 to 24, a(n) mod 39-n - floor(11*n/25)-2*floor(n/8) has a period of 24, consisting of all zeros except a -2 at indices 8, 16, and 24.
The asymptotic density of this sequence is 8/13. - Amiram Eldar, Oct 23 2020
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1).
FORMULA
a(n+24) = a(n) + 39.
a(n) = 39*floor((n-1)/24) + f(n) + floor(11*f(n)/25) + 2*floor(f(n)/8) - 2*floor(((n-1)mod 8)/7) + 40*floor(f(n-1)/23), where f(n) = n mod 24.
G.f.: x*(x^22+x^20+x^18+x^16+2*x^14-x^12+3*x^11-x^10+2*x^8+x^6+x^4+x^2+1) / ((x-1)^2*(x+1)*(x^2-x+1)*(x^2+1)*(x^4-x^2+1)*(x^4+1)*(x^8-x^4+1)). - Colin Barker, Oct 07 2013
MAPLE
for n from 1 to 50 do if n mod 3<>0 and n mod 13<>0 then print(n) fi od
MATHEMATICA
CoefficientList[Series[(x^22 + x^20 + x^18 + x^16 + 2 x^14 - x^12 + 3 x^11 - x^10 + 2 x^8 + x^6 + x^4 + x^2 + 1)/((x - 1)^2 (x + 1) (x^2 - x + 1) (x^2 + 1) (x^4 - x^2 + 1) (x^4 + 1) (x^8 - x^4 + 1)), {x, 0, 80}], x] (* Vincenzo Librandi, Oct 08 2013 *)
Select[Range[100], CoprimeQ[39, #] &] (* Amiram Eldar, Oct 23 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary Detlefs, Oct 04 2013
EXTENSIONS
More terms from Colin Barker, Oct 07 2013
a(34) corrected by Vincenzo Librandi, Oct 08 2013
STATUS
approved