login
A128886
a(n) = prime(lucky(n)) - lucky(prime(n)).
1
-1, -2, 4, 2, 4, -2, 4, 22, 28, 4, 16, 2, 22, 14, 70, 48, 28, 40, 12, 2, 34, 24, 36, 42, 24, 16, 88, 82, 96, 68, 10, 46, 52, 70, 30, 28, 106, 84, 82, 62, 56, 78, 82, 106, 114, 118, 18, -40, 52, 66, 68, 52, 136, 70, 46, 52, 54, 64, 112, 78, 114, 94, 10, 50, 82, 82, 4, 136, 90, 74
OFFSET
1,2
COMMENTS
Commutator [prime,lucky] = [A032605, A032606].
LINKS
FORMULA
a(n) = A000040(A000959(n)) - A000959(A000040(n)).
EXAMPLE
a(1) = Prime(Lucky(1)) - Lucky(Prime(1)) = Prime(1) - Lucky(2) = 2 - 3 = -1.
a(2) = Prime(Lucky(2)) - Lucky(Prime(2)) = Prime(3) - Lucky(3) = 5 - 7 = -2.
a(3) = Prime(Lucky(3)) - Lucky(Prime(3)) = Prime(7) - Lucky(5) = 17 - 13 = 4.
PROG
(Perl) use ntheory ":all"; say "$_ ", nth_prime(nth_lucky($_))-nth_lucky(nth_prime($_)) for 1..20; # Dana Jacobsen, Dec 21 2018
CROSSREFS
Cf. A000040, A000959, A032605 (Prime numbers indexed by lucky numbers), A032606 (Lucky numbers indexed by prime numbers).
Sequence in context: A111737 A056672 A037201 * A031883 A366261 A375200
KEYWORD
easy,sign
AUTHOR
Jonathan Vos Post, May 08 2007
EXTENSIONS
Entries corrected starting at a(10) by R. J. Mathar, Oct 22 2010
STATUS
approved