login
Numbers coprime to 39.
2

%I #24 Oct 23 2020 06:18:23

%S 1,2,4,5,7,8,10,11,14,16,17,19,20,22,23,25,28,29,31,32,34,35,37,38,40,

%T 41,43,44,46,47,49,50,53,55,56,58,59,61,62,64,67,68,70,71,73,74,76,77,

%U 79,80,82,83,85,86,88,89,92,94,95,97,98,100,101,103,106

%N Numbers coprime to 39.

%C Numbers not divisible by 3 or 13.

%C 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.

%C The asymptotic density of this sequence is 8/13. - _Amiram Eldar_, Oct 23 2020

%H Vincenzo Librandi, <a href="/A229973/b229973.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_23">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1,-1,2,-1).

%F a(n+24) = a(n) + 39.

%F 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.

%F 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

%p for n from 1 to 50 do if n mod 3<>0 and n mod 13<>0 then print(n) fi od

%t 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 *)

%t Select[Range[100], CoprimeQ[39, #] &] (* _Amiram Eldar_, Oct 23 2020 *)

%Y Cf. A160545, A229829, A229968.

%K nonn,easy

%O 1,2

%A _Gary Detlefs_, Oct 04 2013

%E More terms from _Colin Barker_, Oct 07 2013

%E a(34) corrected by _Vincenzo Librandi_, Oct 08 2013