login
A065502
Positive numbers divisible by 2 or 5; 1/n not purely periodic after decimal point.
10
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,1
COMMENTS
Complement of A045572. - Reinhard Zumkeller, Nov 15 2009
Numbers that cannot be prefixed by a single digit to form a prime in decimal representation: A124665 is a subsequence. - Reinhard Zumkeller, Oct 22 2011
Up to 198, this is almost identical to "a(n) = n such that 3^n-1 is not squarefree", with the only exceptions being 39 and 117, which are not in this sequence. Why is that? - Felix Fröhlich, Oct 19 2014
The asymptotic density of this sequence is 3/5. - Amiram Eldar, Mar 09 2021
FORMULA
A000035(a(n))*(1-A079998(a(n)))=0. - Reinhard Zumkeller, Nov 15 2009
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
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 *)
PROG
(PARI) { n=0; for (m=1, 10^9, if (m%2 == 0 || m%5 == 0, write("b065502.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 20 2009
(PARI) isok(m) = ! ((m%2) && (m%5)); \\ Michel Marcus, Mar 09 2021
(Haskell)
a065502 n = a065502_list !! (n-1)
a065502_list = filter ((> 1) . (gcd 10)) [1..]
-- Reinhard Zumkeller, Oct 22 2011
CROSSREFS
Cf. A000035, A001622, A045572, A051628, A079998, A124665, A047229 (numbers divisible by 2 or 3).
Sequence in context: A062414 A324694 A249025 * A077255 A262439 A331903
KEYWORD
nonn,easy
AUTHOR
Len Smiley, Nov 25 2001
EXTENSIONS
Offset changed from 0 to 1 by Harry J. Smith, Oct 20 2009
STATUS
approved