

A078773


a(n) is the largest prime less than or equal to phi(n), a(1) = a(2) = 0.


2



0, 0, 2, 2, 3, 2, 5, 3, 5, 3, 7, 3, 11, 5, 7, 7, 13, 5, 17, 7, 11, 7, 19, 7, 19, 11, 17, 11, 23, 7, 29, 13, 19, 13, 23, 11, 31, 17, 23, 13, 37, 11, 41, 19, 23, 19, 43, 13, 41, 19, 31, 23, 47, 17, 37, 23, 31, 23, 53, 13, 59, 29, 31, 31, 47, 19, 61, 31, 43, 23, 67, 23, 71, 31, 37, 31
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

The original name was: "Prime preceding phi(n)". However, this is true only for n >= 7 from which onward phi(n) is guaranteed to get only composite values. For n = 3, 4 and 6 for which phi(n) = 2, a(n) = 2 also.


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..16384


FORMULA

a(1) = a(2) = 0 (by convention), and for n >= 3, a(n) = A007917(A000010(n)).  Antti Karttunen, Dec 05 2017


EXAMPLE

phi(10)=4, hence a(10)=3.


MATHEMATICA

If[#<0, 0, #]&/@Table[NextPrime[EulerPhi[n]+1, 1], {n, 80}] (* Harvey P. Dale, Aug 10 2012 *)


PROG

(PARI) for (n=1, 100, print1(precprime(eulerphi(n))", "))


CROSSREFS

Cf. A000010, A007917, A070800.
Sequence in context: A084371 A025476 A331532 * A151663 A162753 A307994
Adjacent sequences: A078770 A078771 A078772 * A078774 A078775 A078776


KEYWORD

nonn


AUTHOR

Jon Perry, Jan 09 2003


EXTENSIONS

Name changed by Antti Karttunen, Dec 05 2017


STATUS

approved



