cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

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

Views

Author

Ilya Gutkovskiy, Dec 03 2022

Keywords

Comments

The corresponding indices of n-gonal numbers are 11, 210, 87, 228, 1155, 7854, 66612, 395646, 2193303, ...

Examples

			a(3) = 66, because 66 is a triangular number with 3 distinct prime factors {2, 3, 11} and this is the smallest such number.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

a(12)-a(15) from Daniel Suteu, Dec 04 2022

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

Views

Author

Donovan Johnson, Feb 07 2009

Keywords

Comments

a(18) <= 44573764536301609937057730. - Donovan Johnson, Feb 15 2012

Examples

			a(9) = 2491434660 = 2^2*3*5*11*13*17*19*29*31. 2491434660 is the smallest pentagonal number with 9 distinct prime factors.
		

Crossrefs

Extensions

a(17) from Donovan Johnson, Jun 26 2011

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

Views

Author

Donovan Johnson, Feb 07 2009

Keywords

Comments

a(18) <= 45781615623002935783197090. - Donovan Johnson, Feb 15 2012

Examples

			a(9) = 1722580860 = 2^2*3*5*7*11*13*23*29*43. 1722580860 is the smallest hexagonal number with 9 distinct prime factors.
		

Crossrefs

Programs

  • Mathematica
    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 *)

A156239 Smallest octagonal number with n distinct prime factors.

Original entry on oeis.org

8, 21, 280, 1680, 38760, 326040, 10986360, 185040240, 4897368840, 383246454360, 13143876816840, 376306806515640, 27961718389364760, 3250163645572822440, 152582219844376633080, 6202664616058189439160, 1454199694916714984358120
Offset: 1

Views

Author

Donovan Johnson, Feb 07 2009

Keywords

Comments

a(18) <= 68286531655807008335271480. - Donovan Johnson, Feb 15 2012

Examples

			a(9) = 4897368840 = 2^3*3*5*7*13*17*23*31*37. 4897368840 is the smallest octagonal number with 9 distinct prime factors.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

a(17) from Donovan Johnson, Jul 03 2011

A165237 Long legs of primitive Pythagorean triples (a,b,c) for which 2a+1, 2b+1 and 2c+1 are primes.

Original entry on oeis.org

21, 56, 285, 483, 783, 999, 1269, 1593, 1911, 2613, 3003, 3596, 3621, 3740, 4136, 4233, 4928, 5096, 5451, 5828, 5840, 6320, 7040, 7280, 8036, 8468, 9021, 9296, 9591, 11660, 12075, 12573, 12705, 12920, 12956, 13563, 14396, 14595, 15429, 15561
Offset: 1

Views

Author

Keywords

Examples

			See A165236.
		

Crossrefs

Programs

  • Mathematica
    amax=6*10^4;lst={};k=0;q=12!;Do[If[(e=((n+1)^2-n^2))>amax,Break[]];Do[If[GCD[m,n]==1,a=m^2-n^2;If[PrimeQ[2*a+1],b=2*m*n;If[PrimeQ[2*b+1],If[GCD[a,b]==1,If[a>b,{a,b}={b,a}];If[a>amax,Break[]];c=m^2+n^2;If[PrimeQ[2*c+1],k++;AppendTo[lst,b]]]]]];If[a>amax,Break[]],{m,n+1,12!,2}],{n,1,q,1}];Union@lst
Showing 1-5 of 5 results.