login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262389 Numbers whose last digit is composite. 3

%I #32 Sep 08 2022 08:46:14

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

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 07:55 EDT 2024. Contains 371769 sequences. (Running on oeis4.)