A281947 Smallest prime p such that p^i - 1 is a totient (A002202) for all i = 1 to n, or 0 if no such p exists.
2, 3, 7, 7, 37, 37, 113, 113, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 2113, 2113, 2113, 2113, 2113, 2113, 3121, 3121, 3121, 3121
Offset: 1
Examples
a(3) = 7 because 7^2 - 1 = 48, 7^3 - 1 = 342 are both totient numbers (A002202) and 7 is the least prime number with this property.
Programs
-
PARI
isok(p, n)=for (i=1, n, if (! istotient(p^i-1), return(0));); 1; a(n) = {my(p=2); while (! isok(p, n), p = nextprime(p+1)); p;} \\ Michel Marcus, Feb 04 2017
Extensions
a(19) from Michel Marcus, Feb 04 2017
a(20)-a(28) from Ray Chandler, Feb 08 2017
Comments