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!)
A293292 Numbers with last digit less than 5 (in base 10). 2

%I #52 Sep 08 2022 08:46:19

%S 0,1,2,3,4,10,11,12,13,14,20,21,22,23,24,30,31,32,33,34,40,41,42,43,

%T 44,50,51,52,53,54,60,61,62,63,64,70,71,72,73,74,80,81,82,83,84,90,91,

%U 92,93,94,100,101,102,103,104,110,111,112,113,114,120,121,122,123,124,130

%N Numbers with last digit less than 5 (in base 10).

%C Equivalently, numbers k such that floor(k/5) = 2*floor(k/10).

%C After 0, partial sums of A010122 starting from the 2nd term.

%C The sequence differs from A007091 after a(25).

%C Also numbers k such that floor(k/5) is even. - _Peter Luschny_, Oct 05 2017

%H Colin Barker, <a href="/A293292/b293292.txt">Table of n, a(n) for n = 1..1000</a>

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

%F G.f.: x^2*(1 + x + x^2 + x^3 + 6*x^4)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).

%F a(n) = a(n-1) + a(n-5) - a(n-6).

%F a(n) = (n-1) + 5*floor((n-1)/5) = 10*floor((n-1)/5) + ((n-1) mod 5).

%F a(n) = A257145(n+2) - A239229(n-1). - _R. J. Mathar_, Oct 05 2017

%p select(k -> type(floor(k/5), even), [$0..130]); # _Peter Luschny_, Oct 05 2017

%t Table[n + 5 Floor[n/5], {n, 0, 70}]

%t Reap[For[k = 0, k <= 130, k++, If[Floor[k/5] == 2*Floor[k/10], Sow[k]]]][[2, 1]] (* or *) LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 10}, 66] (* _Jean-François Alcover_, Oct 05 2017 *)

%o (Magma) [n: n in [0..130] | n mod 10 lt 5];

%o (Magma) [n: n in [0..130] | IsEven(Floor(n/5))];

%o (Magma) [n+5*Floor(n/5): n in [0..70]];

%o (PARI) concat(0, Vec(x^2*(1 + x + x^2 + x^3 + 6*x^4) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)) + O(x^70))) \\ _Colin Barker_, Oct 05 2017

%o (PARI) select(k->floor(k/5) == 2*floor(k/10), vector(1000, k, k)) \\ _Colin Barker_, Oct 05 2017

%o (Python 3) [k for k in range(131) if (k//5) % 2 == 0] # _Peter Luschny_, Oct 05 2017

%o (Sage) [k for k in (0..130) if 2.divides(floor(k/5))] # _Peter Luschny_, Oct 05 2017

%Y Cf. A010122, A239229, A257145, A293481 (complement).

%Y Sequences of the type floor(n/d) = (10/d)*floor(n/10), where d is a factor of 10: A008592 (d=1), A197652 (d=2), this sequence (d=5), A001477 (d=10).

%Y Sequences of the type n + r*floor(n/r): A005843 (r=1), A042948 (r=2), A047240 (r=3), A047476 (r=4), this sequence (r=5).

%K nonn,base,easy

%O 1,3

%A _Bruno Berselli_, Oct 05 2017

%E Definition by _David A. Corneth_, Oct 05 2017

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 March 28 11:59 EDT 2024. Contains 371254 sequences. (Running on oeis4.)