The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A156239 Smallest octagonal number with n distinct prime factors. 4
8, 21, 280, 1680, 38760, 326040, 10986360, 185040240, 4897368840, 383246454360, 13143876816840, 376306806515640, 27961718389364760, 3250163645572822440, 152582219844376633080, 6202664616058189439160, 1454199694916714984358120 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(18) <= 68286531655807008335271480. - Donovan Johnson, Feb 15 2012
LINKS
Eric Weisstein's World of Mathematics, Octagonal Numbers.
EXAMPLE
a(9) = 4897368840 = 2^3*3*5*7*13*17*23*31*37. 4897368840 is the smallest octagonal number with 9 distinct prime factors.
MATHEMATICA
f[n_] := PrimeNu@ n; nn = 10; k = 1; t = Table[0, {nn}]; While[Times@@t == 0, oct = k(3k-2); a = f@ oct; If[ a <= nn && t[[a]] == 0, t[[a]] = k; Print[{a, oct}]]; k++]; t (* Robert G. Wilson v, Aug 23 2012 *)
PROG
(Python)
from sympy import primefactors
def octagonal(n): return n*(3*n - 2)
def a(n):
k = 1
while len(primefactors(octagonal(k))) != n: k += 1
return octagonal(k)
print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Aug 21 2021
(Python) # faster version using octagonal structure
from sympy import primefactors, primorial
def A000567(n): return n*(3*n-2)
def A000567_distinct_factors(n):
return len(set(primefactors(n)) | set(primefactors(3*n-2)))
def a(n):
k, lb = 1, primorial(n)
while A000567(k) < lb: k += 1
while A000567_distinct_factors(k) != n: k += 1
return A000567(k)
print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Aug 21 2021
CROSSREFS
Sequence in context: A228756 A228504 A270552 * A141369 A060390 A019281
KEYWORD
nonn
AUTHOR
Donovan Johnson, Feb 07 2009
EXTENSIONS
a(17) from Donovan Johnson, Jul 03 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 08:45 EDT 2024. Contains 373424 sequences. (Running on oeis4.)