OFFSET
1,2
COMMENTS
Numbers that are not divisible by 6. - Benoit Cloitre, Jul 11 2009
More generally the sequence a(n,m) 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
LINKS
Ivan Panchenko, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
a(n) = 5 + a(n-5).
G.f.: x*(1+x)*(1+x+x^2)*(x^2-x+1) / ( (x^4+x^3+x^2+x+1)*(x-1)^2 ).
a(n) = n - 1 + floor((n+4)/5). - Benoit Cloitre, Jul 11 2009
A122841(a(n)) = 0. - Reinhard Zumkeller, Nov 10 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = (15-4*sqrt(3))*Pi/36. - Amiram Eldar, Dec 31 2021
MATHEMATICA
Select[Table[n, {n, 200}], Mod[#, 6]!=0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011*)
PROG
(PARI) a(n)= 1+n+n\5
(PARI) a(n)=n-1+floor((n+4)/5) \\ Benoit Cloitre, Jul 11 2009
(Haskell)
a047253 n = n + n `div` 5
a047253_list = [1..5] ++ map (+ 6) a047253_list
-- Reinhard Zumkeller, Nov 10 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Extended by R. J. Mathar, Oct 18 2008
STATUS
approved