OFFSET
1,2
COMMENTS
A045572 contains the positive numbers coprime to 10.
Nondivisor primes p (i.e., all primes except p | 10, that is, 2 or 5) belong to one of four residues r (i.e., 1, 3, 7, 9) in the reduced residue system mod 10. Therefore all primes aside from 2 and 5 appear in A045572. On account of this fact, one may use A045572 as a sort of prime sieve. This use is less efficient than searching for primes aside from 2 and 3 amid numbers that are +/-1 (mod 6), i.e., in A007310, and slightly more efficient than searching for primes aside from 2 amid the odd numbers, but in line with the common (decimal) base.
FORMULA
For prime p_n for n =/= 1 nor n =/= 3, a(p_n) = 4*q + (r + 1)/2 - [r > 5] (Iverson brackets), where q = floor(p_n/10) and r = p_n mod 10.
EXAMPLE
MATHEMATICA
Array[If[FreeQ[{2, 5}, #], 4 #1 + (#2 + 1)/2 - Boole[#2 > 5] & @@ QuotientRemainder[#, 10], 0] &@ Prime@ # &, 65]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Aug 27 2020
STATUS
approved