login
Nonprime numbers n such that phi(n) divides n^2 - 1, where phi(n) (A000010) is Euler's totient function.
2

%I #21 Mar 02 2019 02:23:48

%S 1,15,35,65,91,255,377,559,1295,2001,2059,2431,4081,7743,8911,10745,

%T 12851,22791,26335,39689,51271,61699,65535,73151,95201,97681,112897,

%U 114191,139231,150177,184255,216545,229503,286937,294785,296191,334369

%N Nonprime numbers n such that phi(n) divides n^2 - 1, where phi(n) (A000010) is Euler's totient function.

%C Number of terms < 10^k: 1, 5, 8, 15, 26, 46, 71, 105, 160, 228, ..., . _Robert G. Wilson v_, Jan 10 2018

%H Robert G. Wilson v, <a href="/A098271/b098271.txt">Table of n, a(n) for n = 1..229</a> (first 99 terms from G. C. Greubel)

%t Select[ Range[ 335000], Mod[ #^2 - 1, EulerPhi[ # ]] == 0 && !PrimeQ[ # ] &]

%o (PARI) isok(n) = !isprime(n) && !((n^2-1) % eulerphi(n)); \\ _Michel Marcus_, Jan 11 2018

%Y Cf. A000010, A097605.

%K nonn

%O 1,2

%A _Leroy Quet_ and _Robert G. Wilson v_, Sep 01 2004