login
A334495
Position of prime(n) in A045572, a(1) = a(3) = 0.
0
0, 2, 0, 3, 5, 6, 7, 8, 10, 12, 13, 15, 17, 18, 19, 22, 24, 25, 27, 29, 30, 32, 34, 36, 39, 41, 42, 43, 44, 46, 51, 53, 55, 56, 60, 61, 63, 66, 67, 70, 72, 73, 77, 78, 79, 80, 85, 90, 91, 92, 94, 96, 97, 101, 103, 106, 108, 109, 111, 113, 114, 118, 123, 125, 126
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
a(1) = a(3) = 0 by definition, since 2 and 5 are not in A045572.
a(2) = 2 since A045572(2) = 3, a(10) = 12 since prime(10) = 29 = A045572(12), etc.
MATHEMATICA
Array[If[FreeQ[{2, 5}, #], 4 #1 + (#2 + 1)/2 - Boole[#2 > 5] & @@ QuotientRemainder[#, 10], 0] &@ Prime@ # &, 65]
CROSSREFS
Cf. A000040, A045572. Analogous to A181709.
Sequence in context: A343932 A216440 A094720 * A155800 A276658 A079510
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Aug 27 2020
STATUS
approved