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).
FORMULA
From Elmo R. Oliveira, Jul 01 2026: (Start)
a(n) = A335774(n) / 7.
a(n) = a(n-1) + a(n-14) - a(n-15).
G.f.: x * (1 + x^2) * (1 + x + x^2) * (2 - x - 2*x^2 + 3*x^3 + 3*x^4 - 5*x^5 + 3*x^6 + 3*x^7 - 2*x^8 - x^9 + 2*x^10) / ((1 - x) * (1 - x^14)). (End)
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,changed
AUTHOR
Michael De Vlieger, Jul 26 2024
STATUS
approved
