This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A058340 #40 Nov 18 2022 08:28:54 %S A058340 11,23,29,31,47,53,59,67,71,79,83,103,107,127,131,137,139,149,151,167, %T A058340 173,179,191,197,199,211,223,227,229,239,251,263,269,271,283,293,307, %U A058340 311,317,331,347,359,367,373,379,383,389,419,431,439,443,463,467,479 %N A058340 Primes p such that phi(x) = p-1 has only 2 solutions, namely x = p and x = 2p. %C A058340 Two solutions, p and 2p, exist for all odd primes p; primes in sequence have no other solutions. %C A058340 Conjecture: if q > 7 is in A005385, then q is in the sequence. - _Thomas Ordowski_, Jan 04 2017 %C A058340 Proof of conjecture: q'=(q-1)/2 is an odd prime > 3. If phi(x)=2q', which has 2-adic order 1 but is not a power of 2, there must be exactly one odd prime r dividing x. We could also have a factor of 2 (but no higher power, which would contribute more 2's to phi(x)). If x = r^e or 2r^e, then phi(x) = (r-1) r^(e-1). For this to be 2q' one possibility is r-1 = 2 and r^(e-1)=q', but then q'=r=3, ruled out by q > 7. The only other possibility is r-1=2q' and e=1, which makes r=q and x=q or 2q. - _Robert Israel_, Jan 04 2017 %C A058340 Information from Carl Pomerance: It is known that almost all primes (in the sense of relative asymptotic density) are in the sequence. - _Thomas Ordowski_, Jan 08 2017 %H A058340 Robert Israel, <a href="/A058340/b058340.txt">Table of n, a(n) for n = 1..10000</a> %F A058340 a(n) ~ n log . - _Charles R Greathouse IV_, Nov 18 2022 %e A058340 For p=2, phi(x)=1 has only two solutions, but they are 1 and 2, not 2 and 4, so 2 is not in the sequence. %p A058340 filter:= n -> isprime(n) and nops(numtheory:-invphi(n-1))=2: %p A058340 select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Aug 12 2016 %t A058340 Take[Rest@ Keys@ Select[KeySelect[KeyMap[# + 1 &, PositionIndex@ Array[EulerPhi, 10^4]], PrimeQ], Length@ # == 2 &], 54] (* _Michael De Vlieger_, Dec 29 2017 *) %Y A058340 Cf. A000010, A000040, A005385, A006093, A058339, A066071, A066072, A066073, A066074, A066075, A066076, A066077, A066080, A138537. %K A058340 nonn %O A058340 1,1 %A A058340 _Labos Elemer_, Dec 14 2000 %E A058340 Edited by _Ray Chandler_, Jun 06 2008