OFFSET
0,2
LINKS
Eric Weisstein's World of Mathematics, Centered Triangular Number
Eric Weisstein's World of Mathematics, Prime Factor
EXAMPLE
a(4) = 136, because 136 is a centered triangular number with 4 prime factors (counted with multiplicity) {2, 2, 2, 17} and this is the smallest such number.
MATHEMATICA
c[k_] := (3*k^2 + 3*k + 2)/2; a[n_] := Module[{k = 0, ck}, While[PrimeOmega[ck = c[k]] != n, k++]; ck]; Array[a, 18, 0] (* Amiram Eldar, Dec 09 2022 *)
PROG
(PARI) a(n) = if(n==0, return(1)); for(k=1, oo, my(t=3*k*(k+1)/2 + 1); if(bigomega(t) == n, return(t))); \\ Daniel Suteu, Dec 10 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 06 2022
EXTENSIONS
a(22)-a(26) from Daniel Suteu, Dec 10 2022
STATUS
approved