Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #37 Jul 30 2024 06:01:33
%S 4,6,8,9,14,16,18,19,24,26,28,29,34,36,38,39,44,46,48,49,54,56,58,59,
%T 64,66,68,69,74,76,78,79,84,86,88,89,94,96,98,99,104,106,108,109,114,
%U 116,118,119,124,126,128,129,134,136,138,139,144,146,148,149
%N Numbers whose last digit is composite.
%C Numbers ending in 4, 6, 8 or 9.
%C Union of A017317, A017341, A017365 and A017377.
%C Subsequence of A118951 (numbers containing at least one composite digit).
%C Complement of (A197652 Union A260181).
%H Gerald Hillier and Didier Lachieze, <a href="https://www.hpcalc.org/details/8669">Last Digit Composite</a>.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F G.f.: x*(4+2*x+2*x^2+x^3+x^4)/((x-1)^2*(1+x+x^2+x^3)).
%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
%F a(n) = (5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4)/2)/2.
%F Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(10-2*sqrt(5))*Pi - sqrt(5)*arccoth(3/sqrt(5)) - 4*log(2))/20. - _Amiram Eldar_, Jul 30 2024
%p A262389:=n->(5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4)/2)/2: seq(A262389(n), n=1..100);
%t Table[(5n+1-(-1)^n+(3+(-1)^n)*(-1)^((2n-3-(-1)^n)/4)/2)/2, {n, 100}]
%t LinearRecurrence[{1, 0, 0, 1, -1}, {4, 6, 8, 9, 14}, 80] (* _Vincenzo Librandi_, Sep 21 2015 *)
%t CoefficientList[Series[(4 + 2*x + 2*x^2 + x^3 + x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 80}], x] (* _Wesley Ivan Hurt_, Sep 21 2015 *)
%t Select[Range[200],CompositeQ[Mod[#,10]]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 21 2019 *)
%o (Magma) [(5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n) div 4) div 2) div 2: n in [1..70]]; // _Vincenzo Librandi_, Sep 21 2015
%Y Cf. A017317, A017341, A017365, A017377.
%Y Cf. A118951, A197652, A260181 (last digit is prime).
%K nonn,base,easy
%O 1,1
%A _Wesley Ivan Hurt_, Sep 21 2015
%E Name edited by _Jon E. Schoenfield_, Feb 15 2018