OFFSET
1,1
COMMENTS
Numbers k congruent to r (mod 30), where r is in {2, 3, 4, 5, 8, 9, 14, 16, 21, 22, 25, 26, 27, 28}, residues r = p^m mod 30 and r = (30 - p^m) mod 30.
The asymptotic density of this sequence is 7/15. - Amiram Eldar, Jul 26 2024
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,0,0,1,-1).
EXAMPLE
8 is in this sequence since it is even and a multiple of neither 3 nor 5.
10 is not in this sequence since 10 = 2*5; both 2 and 5 divide 30.
14 is in this sequence since it is even and a multiple of neither 3 nor 5, etc.
MATHEMATICA
s = Prime@ Range[3]; k = Times @@ s; r = Union[#, k - #] &@ Flatten@ Map[PowerRange[#, k, #] &, s]; m = Length[r]; Array[k*#1 + r[[1 + #2]] & @@ QuotientRemainder[# - 1, m] &, 60]
PROG
(PARI) is(k) = isprime(gcd(k, 30)); \\ Amiram Eldar, Jul 26 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Jul 26 2024
STATUS
approved