A358862
a(n) is the smallest n-gonal number with exactly n distinct prime factors.
Original entry on oeis.org
66, 44100, 11310, 103740, 3333330, 185040240, 15529888374, 626141842326, 21647593547580, 351877410344460, 82634328555218440, 2383985537862979050, 239213805711830629680
Offset: 3
a(3) = 66, because 66 is a triangular number with 3 distinct prime factors {2, 3, 11} and this is the smallest such number.
-
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 *)
-
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
-
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
A156238
Smallest heptagonal number with n distinct prime factors.
Original entry on oeis.org
7, 18, 286, 3010, 32890, 769230, 3333330, 159189030, 16015883940, 477463360374, 21643407275490, 1148540321999070, 18489352726664820, 4561561662153109614, 71000485538666794110, 14440652550858108745170, 927869754030522488795610
Offset: 1
a(9) = 16015883940 = 2^2*3^2*5*7*17*19*23*29*59. 16015883940 is the smallest heptagonal number with 9 distinct prime factors.
-
from sympy import primefactors
def A000566(n): return n*(5*n-3)//2
def a(n):
k = 1
while len(primefactors(A000566(k))) != n: k += 1
return A000566(k)
print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Jul 18 2021
-
# faster version using heptagonal structure
from sympy import primefactors
def A000566(n): return n*(5*n-3)//2
def A000566_distinct_factors(n):
pf1 = primefactors(n)
pf2 = primefactors(5*n-3)
combined = set(pf1) | set(pf2)
return len(combined) if n%4 == 0 or (5*n-3)%4 == 0 else len(combined)-1
def a(n):
k = 1
while A000566_distinct_factors(k) != n: k += 1
return A000566(k)
print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Jul 18 2021
A156236
Smallest pentagonal number with n distinct prime factors.
Original entry on oeis.org
5, 12, 70, 210, 11310, 145860, 1560090, 23130030, 2491434660, 200736225690, 1906748513670, 281993526895080, 9427390580377770, 904832960818356570, 117584828859645537390, 2928413909631253063020, 400579656276180828206760
Offset: 1
a(9) = 2491434660 = 2^2*3*5*11*13*17*19*29*31. 2491434660 is the smallest pentagonal number with 9 distinct prime factors.
A156237
Smallest hexagonal number with n distinct prime factors.
Original entry on oeis.org
6, 66, 630, 7140, 103740, 1272810, 56812470, 1722580860, 48098217090, 1850186768430, 139261952960130, 17743036637876550, 741902728913225880, 21549201398378163510, 2378522762792139793830, 351206814022419685159830
Offset: 2
a(9) = 1722580860 = 2^2*3*5*7*11*13*23*29*43. 1722580860 is the smallest hexagonal number with 9 distinct prime factors.
-
Module[{nn=167*10^5,c},c={#,PrimeNu[#]}&/@PolygonalNumber[6,Range[nn]];Table[ SelectFirst[ c,#[[2]]==n&],{n,2,12}]][[;;,1]] (* The program generates the first 11 terms of the sequence. *) (* Harvey P. Dale, Jan 19 2024 *)
Showing 1-4 of 4 results.
Comments