A065502 Positive numbers divisible by 2 or 5; 1/n not purely periodic after decimal point.
2, 4, 5, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 25, 26, 28, 30, 32, 34, 35, 36, 38, 40, 42, 44, 45, 46, 48, 50, 52, 54, 55, 56, 58, 60, 62, 64, 65, 66, 68, 70, 72, 74, 75, 76, 78, 80, 82, 84, 85, 86, 88, 90, 92, 94, 95, 96, 98, 100, 102, 104, 105, 106, 108, 110, 112, 114
Offset: 1
Links
- Harry J. Smith, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-1).
Crossrefs
Programs
-
Haskell
a065502 n = a065502_list !! (n-1) a065502_list = filter ((> 1) . (gcd 10)) [1..] -- Reinhard Zumkeller, Oct 22 2011
-
Maple
A065502 := proc(n) option remember; if n = 1 then 2; else for a from procname(n-1)+1 do if (a mod 2) =0 or (a mod 5) =0 then return a; end if; end do: end if; end proc; # R. J. Mathar, Jul 20 2012
-
Mathematica
Select[Range[114], Mod[#, 2] == 0 || Mod[#, 5] == 0 &] (* T. D. Noe, Jul 13 2012 *) Select[ Range@ 114, MemberQ[{0, 2, 4, 5, 6, 8}, Mod[#, 10]] &] (* Robert G. Wilson v, May 22 2014 *)
-
PARI
isok(m) = ! ((m%2) && (m%5)); \\ Michel Marcus, Mar 09 2021
Formula
G.f.: x*(2*x^4+x^2+2) / ((x-1)^2*(x^2-x+1)*(x^2+x+1)). - Colin Barker, Jul 18 2013
a(n) = 10*floor(n/6)+s(n mod 6)-floor(((n-1)mod 6)/5), where s(n) = n+1+floor((n+1)/3). - Gary Detlefs, Oct 05 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/5 + log(phi)/sqrt(5), where phi is the golden ratio (A001622). - Amiram Eldar, Dec 28 2021
Extensions
Offset changed from 0 to 1 by Harry J. Smith, Oct 20 2009
Comments