OFFSET
1,1
COMMENTS
These minimal integers are always prime. To be clear, the phi function referred to here is Euler's totient function.
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Euler's Totient Function
EXAMPLE
The first term is 5. phi(5) = 4 and phi(4)=2. 2 is a multiple of the first prime 2. 5 is the lowest such number x where 2 divides phi(phi(x)).
MAPLE
with(numtheory): P:=proc(n) local a, k; a:=ithprime(n);
for k from 1 to 10^3 do if frac(phi(phi(ithprime(k)))/a)=0
then RETURN(ithprime(k)); break; fi; od; end:
seq(P(i), i=1..46); # Paolo P. Lava, Oct 10 2018
MATHEMATICA
a[n_] := (p=Prime[n]; k=1; While[k++; x=Prime[k]; Mod[ EulerPhi[ EulerPhi[x]], p] != 0]; x); Table[a[n], {n, 50}] (* Jean-François Alcover, Sep 14 2011 *)
PROG
(PARI) /* not the most efficient implementation */ ppp(a, b)= { forprime(p=a, b, v = 2*p + 1; v2 = 1; minv = 100000000; while (v2 <= minv || v <=minv, /* print ("Checking ", v, " for ", p); */ while(!isprime(v), v += 2*p /*; print ("Checking ", v, " for ", p)*/ ); if (v%(p*p)==1, /* don't do this step if: p^2 | v-1 */ v2 = v , v2 = 2*v + 1; while (!isprime(v2) && v2 < minv, v2 += 2*v ) ); if (v2 < minv, minv = v2; ); v += 2*p ); print (p, " => ", minv) ) }
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Fred Schneider, Nov 11 2009
STATUS
approved