A219018 Smallest number k > 0 such that k^n + 1 has exactly n distinct prime factors.
1, 3, 5, 43, 17, 47, 51, 1697, 59, 512, 521, 3255, 8189, 18951, 656
Offset: 1
Examples
a(3) = 5 is the smallest number of the set {k(i)} = {5, 9, 10, 11, 12, 13, 14, 19,….} where k(i)^3 + 1 has exactly 3 distinct prime factors.
Programs
-
Maple
with(numtheory) :for n from 1 to 10 do:ii:=0:for k from 1 to 10^10 while(ii=0) do:x:=k^n+1:y:=factorset(x):n1:=nops(y):if n1=n then ii:=1: printf ( "%d %d \n",n,k): else fi:od:od:
-
Mathematica
L = {}; Do[n = 1; While[Length[FactorInteger[n^k + 1]] != k, n++]; Print@AppendTo[L, n], {k, 15}] (* Giovanni Resta, Nov 09 2012 *)
-
PARI
a(n) = my(k=1); while (omega(k^n+1) != n, k++); k; \\ Daniel Suteu, Feb 06 2023
Extensions
Definition clarified by Daniel Suteu, Feb 06 2023
a(13)-a(15) from Daniel Suteu, Feb 06 2023
Comments