login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047201 Numbers not divisible by 5. 36

%I

%S 1,2,3,4,6,7,8,9,11,12,13,14,16,17,18,19,21,22,23,24,26,27,28,29,31,

%T 32,33,34,36,37,38,39,41,42,43,44,46,47,48,49,51,52,53,54,56,57,58,59,

%U 61,62,63,64,66,67,68,69,71,72,73,74,76,77,78,79,81,82,83,84,86,87

%N Numbers not divisible by 5.

%C Original name was: Numbers that are congruent to {1, 2, 3, 4} mod 5.

%C More generally the sequence of numbers not divisible by some fixed integer m>=2 is given by a(n,m)=n-1+floor((n+m-2)/(m-1)). - _Benoit Cloitre_, Jul 11 2009

%C Complement of A008587; A011558(a(n))=1; A079998(a(n))=0. - _Reinhard Zumkeller_, Nov 30 2009

%C a(n) = A225496(n) for n <= 42. - _Reinhard Zumkeller_, May 09 2013

%H Reinhard Zumkeller, <a href="/A047201/b047201.txt">Table of n, a(n) for n = 1..10000</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+2*x^2+3*x^3+4*x^4+4*x^5+3*x^6+2*x^7+x^8)/(1-x^4)^2 (not reduced). - _Len Smiley_

%F a(n) = 5+a(n-4).

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

%F a(n) = n-1+floor((n+3)/4). - _Benoit Cloitre_, Jul 11 2009

%F a(n) = floor((15n-1)/12). - _Gary Detlefs_, Mar 07 2010

%F From _Wesley Ivan Hurt_, Jun 22 2015: (Start)

%F a(n) = a(n-1) + a(n-4) - a(n-5), n>5.

%F a(n) = (10*n-5-(-1)^n+2*(-1)^((2*n+5-(-1)^n)/4))/8. (End)

%p seq(floor((15*n-1)/12), n=1..56); # _Gary Detlefs_, Mar 07 2010

%t Select[Table[n,{n,200}],Mod[#,5]!=0&] (* _Vladimir Joseph Stephan Orlovsky_, Feb 18 2011 *)

%o (PARI) a(n)= 1+n+n\4

%o (PARI) a(n)=n-1+floor((n+3)/4) \\ _Benoit Cloitre_, Jul 11 2009

%o (Sage) [i for i in range(72) if gcd(5,i) == 1] # _Zerinvary Lajos_, Apr 21 2009

%o (Haskell)

%o a047201 n = a047201_list !! (n-1)

%o a047201_list = [x | x <- [1..], mod x 5 > 0]

%o -- _Reinhard Zumkeller_, Dec 17 2011

%o (MAGMA) [Floor((15*n-1)/12): n in [1..70]]; // _Vincenzo Librandi_, Apr 06 2015

%Y Cf. A045572.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

%E Comment from _Lekraj Beedassy_, Dec 17 2006 is now the current name. - _Wesley Ivan Hurt_, Jun 25 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 08:42 EDT 2018. Contains 316405 sequences. (Running on oeis4.)