|
|
A136106
|
|
a(n) is the smallest prime p such that in the sequence of n numbers p, p+1, p+2, ..., p+n-1, the i-th term has exactly i distinct prime factors, for i = 1, ..., n.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(4) = 1867 because it begins with the prime 1867 followed by 1868 with two distinct prime factors, 2 and 467; then 1869 with three distinct prime factors, 3, 7 and 89; then 1870 with four distinct prime factors, 2, 5, 11 and 17.
|
|
MATHEMATICA
|
Table[First[Select[Prime@Range@100000, (n=1; k=#; While[Length[First/@FactorInteger@k]==n, k++; n++]; n-1==t)&]], {t, 5}] (* Giorgos Kalogeropoulos, May 07 2019 *)
|
|
PROG
|
(PARI) /* a brute force program */ a136106(st, ed, ct)={ forprime(x=st, ed, if ((x%6)!=1, next); goodFlag = 1; c = 1; while(goodFlag, if (!(c%2) && isprime(x+c), goodFlag=0, v = factor(x+c); if (length(v[, 2]) == c+1, c+=1; if (c > ct, print("Level = ", c, " at ", x+c-1, "=", v); ct+=1), goodFlag = 0 ) ) ) ); } \\ Fred Schneider, Dec 18 2007
|
|
CROSSREFS
|
|
|
KEYWORD
|
more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|