login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A275969 Least k such that phi(k) has exactly n prime factors (counted with multiplicity). 2

%I #30 Aug 18 2016 19:44:30

%S 3,5,13,17,51,85,193,257,769,1285,3281,4369,12289,21845,49601,65537,

%T 196611,327685,786433,1114129,3158273,5570645,12648641,16843009,

%U 50397953,84215045,202113281,286331153,805384193,1431655765,3221225473,8168859365,12952273921

%N Least k such that phi(k) has exactly n prime factors (counted with multiplicity).

%C Least k such that A001222(A000010(k)) = n.

%C If 2^2^n + 1 is a Fermat prime (A019434), then a(2^n) = 2^2^n + 1. - _Michael De Vlieger_, Aug 15 2016

%e a(2) = 5 because phi(5) = 4 has 2 prime factors (counted with multiplicity).

%t Table[k = 1; While[PrimeOmega@ EulerPhi@ k != n, k++]; k, {n, 16}] (* _Michael De Vlieger_, Aug 15 2016 *)

%o (PARI) a(n) = {my(k = 1); while(bigomega(eulerphi(k)) != n, k++); k; }

%o (Perl) use ntheory ":all"; sub a275969 { my($k,$n)=(1,shift); $k++ while scalar(factor(euler_phi($k))) != $n; $k; } # _Dana Jacobsen_, Aug 16 2016

%o (Perl) use v5.16; use ntheory ":all";

%o my($s,$chunk,$lp,@done) = (1,2e6,0);

%o while (1) {

%o my @npf = map { scalar(factor($_)) } euler_phi($s, $s+$chunk-1);

%o if (vecany { $_>$lp } @npf) {

%o while (my($idx,$val) = each @npf) {

%o $done[$val] //= $s+$idx if $val > $lp;

%o }

%o while ($done[$lp+1]) { $lp++; say "$lp $done[$lp]"; }

%o }

%o $s += $chunk;

%o } # _Dana Jacobsen_, Aug 16 2016

%Y Cf. A000010, A001222, A019434, A073918.

%K nonn

%O 1,1

%A _Altug Alkan_, Aug 15 2016

%E a(26)-a(33) from _Dana Jacobsen_, Aug 16 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)