login
a(n) is the smallest n-gonal number with exactly n prime factors (counted with multiplicity).
7

%I #23 Feb 19 2023 10:49:55

%S 4,28,16,176,4950,8910,1408,346500,277992,7542080,326656,544320,

%T 120400000,145213440,48549888,4733575168,536813568,2149576704,

%U 3057500160,938539560960,1358951178240,36324805836800,99956555776,49212503949312,118747221196800,59461613912064,13749193801728

%N a(n) is the smallest n-gonal number with exactly n prime factors (counted with multiplicity).

%C The corresponding indices of n-gonal numbers are 7, 4, 11, 50, 60, 22, 315, 264, 1295, 256, 315, 4480, 4727, 2634, 25123, 8192, 15903, 18432, 314315, 368640, ...

%C a(n) is the first n-gonal number k such that A001222(k)= n. - _Robert Israel_, Jan 15 2023

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeFactor.html">Prime Factor</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PolygonalNumber.html">Polygonal Number</a>

%F A001222(a(n)) = n. - _Robert Israel_, Jan 15 2023

%e a(3) = 28, because 28 is a triangular number with 3 prime factors (counted with multiplicity) {2, 2, 7} and this is the smallest such number.

%p g:= proc(s) local n, p, F;

%p for n from 1 to 10^7 do

%p p:= (s-2)*n*(n-1)/2 + n;

%p if numtheory:-bigomega(p) = s then return p fi;

%p od

%p end proc:

%p map(g, [$2..30]); # _Robert Israel_, Jan 15 2023

%t sng[n_]:=Module[{k=1},While[PrimeOmega[PolygonalNumber[n,k]]!=n,k++];PolygonalNumber[ n,k]]; Array[sng,21,2] (* The program generates the first 20 terms of the sequence. *) (* _Harvey P. Dale_, Feb 19 2023 *)

%o (PARI) a(n) = if(n<3, return()); for(k=1, oo, my(t=(k*(n*k - n - 2*k + 4))\2); if(bigomega(t) == n, return(t))); \\ _Daniel Suteu_, Dec 04 2022

%o (PARI)

%o bigomega_polygonals(A, B, n, k) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p,ceil(A/m)), B\m, my(t=m*q); if(ispolygonal(t,k), listput(list, t))), forprime(q = p, sqrtnint(B\m, n), my(t=m*q); if(ceil(A/t) <= B\t, list=concat(list, f(t, q, n-1))))); list); vecsort(Vec(f(1, 2, n)));

%o a(n, k=n) = if(k < 3, return()); my(x=2^n, y=2*x); while(1, my(v=bigomega_polygonals(x, y, n, k)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ _Daniel Suteu_, Dec 04 2022

%Y Cf. A001222, A086270, A075088, A209049, A358862, A358864, A358865, A359854.

%K nonn

%O 2,1

%A _Ilya Gutkovskiy_, Dec 03 2022

%E a(23)-a(28) from _Daniel Suteu_, Dec 04 2022

%E a(2)=4 prepended by _Robert Israel_, Jan 15 2023