login
A358862
a(n) is the smallest n-gonal number with exactly n distinct prime factors.
7
66, 44100, 11310, 103740, 3333330, 185040240, 15529888374, 626141842326, 21647593547580, 351877410344460, 82634328555218440, 2383985537862979050, 239213805711830629680
OFFSET
3,1
COMMENTS
The corresponding indices of n-gonal numbers are 11, 210, 87, 228, 1155, 7854, 66612, 395646, 2193303, ...
LINKS
Eric Weisstein's World of Mathematics, Distinct Prime Factors
Eric Weisstein's World of Mathematics, Polygonal Number
EXAMPLE
a(3) = 66, because 66 is a triangular number with 3 distinct prime factors {2, 3, 11} and this is the smallest such number.
MATHEMATICA
Table[SelectFirst[PolygonalNumber[n, Range[400000]], PrimeNu[#]==n&], {n, 3, 10}] (* The program generates the first 8 terms of the sequence. *) (* Harvey P. Dale, Sep 09 2023 *)
PROG
(PARI) a(n) = if(n<3, return()); for(k=1, oo, my(t=(k*(n*k - n - 2*k + 4))\2); if(omega(t) == n, return(t))); \\ Daniel Suteu, Dec 04 2022
(PARI)
omega_polygonals(A, B, n, k) = A=max(A, vecprod(primes(n))); (f(m, p, j) = my(list=List()); forprime(q=p, sqrtnint(B\m, j), my(v=m*q, r=nextprime(q+1)); while(v <= B, if(j==1, if(v>=A && ispolygonal(v, k), listput(list, v)), if(v*r <= B, list=concat(list, f(v, r, j-1)))); v *= q)); list); vecsort(Vec(f(1, 2, n)));
a(n, k=n) = if(n < 3, return()); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=omega_polygonals(x, y, n, k)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Dec 04 2022
KEYWORD
nonn,more
AUTHOR
Ilya Gutkovskiy, Dec 03 2022
EXTENSIONS
a(12)-a(15) from Daniel Suteu, Dec 04 2022
STATUS
approved