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.

Previous Showing 71-80 of 82 results. Next

A177202 Nontrivially polygonal-free numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 14, 17, 19, 23, 26, 29, 31, 37, 38, 41, 43, 47, 53, 59, 61, 62, 67, 71, 73, 74, 77, 79, 83, 86, 89, 97, 101, 103, 107, 109, 113, 119, 122, 127, 131, 134, 137, 139, 143, 146, 149, 151, 157, 158, 161, 163, 167, 173, 179
Offset: 1

Views

Author

Jonathan Vos Post, May 04 2010

Keywords

Comments

Positive integers which are not multiples of any nontrivially polygonal numbers A090466. Generalization of squarefree numbers: numbers that are not divisible by a square greater than 1 (A005117) where "square" is replaced by triangular, square, pentagonal, hexagonal, and so forth. Positive integers which are not positive integer multiples of numbers in the array of A057145 below the second row (which has every positive integer) and right of the 2nd column (which has every positive integer). That is, positive integers which are not positive integer multiples of any triangular number >3, any square >4, any pentagonal number >5, any hexagonal number >6, any heptagonal number >7, any octagonal number >8, any 9-gonal (nonagonal) number >9 and so forth. Properly includes all primes.

Crossrefs

Formula

Complement of A177201.

Extensions

Corrected and extended by Sean A. Irvine, Apr 09 2013

A359854 a(n) is the least n-gonal number that is the product of n distinct primes, or 0 if there are none.

Original entry on oeis.org

6, 66, 0, 11310, 303810, 28962934, 557221665, 15529888374, 1219300152070, 23900058257790, 1231931106828345, 500402553453949510, 14990069451769732194, 610385355391371697410
Offset: 2

Views

Author

Robert Israel, Jan 15 2023

Keywords

Examples

			a(3) = 66 because 66 = 11*12/2 is the 11th triangular number and is the product of 3 distinct primes 2*3*11.
a(4) = 0 because a 4-gonal number is a square, and thus not the product of distinct primes.
		

Crossrefs

Programs

  • Maple
    f:= proc(s) local n,p,F;
      for n from 1 do
        p:= (s-2)*n*(n-1)/2 + n;
        F:= ifactors(p)[2];
        if nops(F) = s and andmap(t -> t[2]=1, F) then return p fi
       od
    end proc:
    f(2):= 0:
    map(f, [$2..11]);
  • Mathematica
    f[s_] := f[s] = Module[{n, p, F}, For[n = 1, True, n++, p = (s - 2)*n*(n-1)/2 + n; F = FactorInteger[p]; If[Length[F] == s && AllTrue[F, #[[2]] == 1&], Return[ p]]]];
    f[4] = 0;
    Table[Print[n, " ", f[n]]; f[n], {n, 2, 11}] (* Jean-François Alcover, Jan 24 2023, after Maple program *)
  • PARI
    squarefree_omega_polygonals(A, B, n, k) = A=max(A, vecprod(primes(n))); (f(m, p, j) = my(list=List()); my(s=sqrtnint(B\m, j)); if(j==1, forprime(q=max(p, ceil(A/m)), s, if(ispolygonal(m*q, k), listput(list, m*q))), forprime(q=p, s, my(t=m*q); if(ceil(A/t) <= B\t, list=concat(list, f(t, q+1, j-1))))); list); vecsort(Vec(f(1, 2, n)));
    a(n, k=n) = if(n < 2, return()); if(n==2, return(6)); if(n==4, return(0)); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=squarefree_omega_polygonals(x, y, n, k)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Jan 18 2023

Extensions

a(11)-a(15) from Daniel Suteu, Jan 18 2023

A360777 a(n) is the index of the least n-gonal number that is the sum of two or more consecutive nonzero n-gonal numbers in more than one way, or -1 if no such number exists.

Original entry on oeis.org

9, 160, 143, 2679, 19933, 115248, 45, 1995
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 20 2023

Keywords

Comments

a(10)>2000000, a(11)=24375, a(12)=133307113, a(13)=6715891, a(16)=189308, a(20)=9009. - Sean A. Irvine, Mar 24 2023

Crossrefs

A374273 a(n) is the smallest number which can be represented as the sum of three distinct nonzero n-gonal numbers in exactly n ways, or -1 if no such number exists.

Original entry on oeis.org

37, 161, 498, 1666, 2546, 7434, 16609, 25952, 48786, 49861, 72347, 127335, 183289, 196469, 416913, 466546, 494369, 506649, 801010, 1401011, 2372586, 1414009, 2003027, 3274986, 2927260, 2721677, 5592756, 8016592, 6632759, 7057914, 8401837, 13248146, 11648679, 8650006
Offset: 3

Views

Author

Ilya Gutkovskiy, Jul 02 2024

Keywords

Examples

			a(3) = 37 = 1 + 15 + 21 = 3 + 6 + 28 = 6 + 10 + 21.
a(4) = 161 = 1^2 + 4^2 + 12^2 = 2^2 + 6^2 + 11^2 = 4^2 + 8^2 + 9^2 = 5^2 + 6^2 + 10^2.
		

Crossrefs

Extensions

a(21) and beyond from Michael S. Branicky, Jul 08 2024

A379337 Number of subsets of the first n nonzero n-gonal numbers whose sum is a nonzero n-gonal number.

Original entry on oeis.org

3, 4, 5, 7, 7, 10, 11, 18, 20, 23, 31, 63, 77, 127, 212, 332, 569, 1034, 1749, 2961, 5236, 9319, 16524, 28583, 53618, 96310, 174573, 309344, 584500, 1077230, 1984982, 3532258, 6791403, 12564409, 23445306, 42349391, 81321728, 152375491, 284898585, 524549566, 1006478176, 1894215667
Offset: 2

Views

Author

Ilya Gutkovskiy, Dec 21 2024

Keywords

Examples

			a(3) = 4 subsets: {1}, {3}, {6}, {1, 3, 6}.
a(4) = 5 subsets: {1}, {4}, {9}, {16}, {9, 16}.
a(5) = 7 subsets: {1}, {5}, {12}, {22}, {35}, {1, 12, 22}, {1, 12, 22, 35}.
		

Crossrefs

Programs

  • Python
    from functools import cache
    from itertools import count, takewhile
    def ngonal(n, k): return k*((n-2)*k - (n-4))//2
    def a(n):
        @cache
        def b(i, s):
            if i == 0: return 1 if s > 0 and s in ISNGONAL else 0
            return b(i-1, s) + b(i-1, s+NGONAL[i-1])
        NGONAL = [ngonal(n, i) for i in range(1, n+1)]
        BOUND = sum(NGONAL)
        ISNGONAL = set(takewhile(lambda x: x<=BOUND, (ngonal(n, i) for i in count(1))))
        b.cache_clear()
        return b(n, 0)
    print([a(n) for n in range(2, 23)]) # Michael S. Branicky, Dec 21 2024

Extensions

a(2) inserted and a(23) and beyond from Michael S. Branicky, Dec 21 2024

A296374 a(0) = 3; a(n) = a(n-1)*(a(n-1)^2 - 3*a(n-1) + 4)/2.

Original entry on oeis.org

3, 6, 66, 137346, 1295413937737986, 1086915296274625337063297033180803022465442306
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 11 2017

Keywords

Comments

The next term is too large to include.

Examples

			a(0) = 3;
a(1) = 6 and 6 is the 3rd triangular number;
a(2) = 66 and 66 is the 6th hexagonal number;
a(3) = 137346 and 137346 is the 66th 66-gonal number, etc.
		

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 3, a[n] == a[n - 1] (a[n - 1]^2 - 3 a[n - 1] + 4)/2}, a[n], {n, 5}]

Formula

a(0) = 3; a(n) = [x^a(n-1)] x*(1 - 2*x + 4*x^2)/(1 - x)^4.
a(0) = 3; a(n) = a(n-1)! * [x^a(n-1)] exp(x)*x*(1 + x^2/2).

A301972 a(n) = n*(n^2 - 2*n + 4)*binomial(2*n,n)/((n + 1)*(n + 2)).

Original entry on oeis.org

0, 1, 4, 21, 112, 570, 2772, 13013, 59488, 266526, 1175720, 5123426, 22108704, 94645460, 402503220, 1702300725, 7165821120, 30043474230, 125523450360, 522857438070, 2172127120800, 9002522512620, 37233403401480, 153704429299746, 633442159732032, 2606543487445100, 10710790748646352, 43957192722175908
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 29 2018

Keywords

Comments

For n > 2, a(n) is the n-th term of the main diagonal of iterated partial sums array of n-gonal numbers (in other words, a(n) is the n-th (n+2)-dimensional n-gonal number, see also example).

Examples

			For n = 5 we have:
----------------------------
0   1    2    3     4    [5]
----------------------------
0,  1,   5,  12,   22,   35,  ... A000326 (pentagonal numbers)
0,  1,   6,  18,   40,   75,  ... A002411 (pentagonal pyramidal numbers)
0,  1,   7,  25,   65,  140,  ... A001296 (4-dimensional pyramidal numbers)
0,  1,   8,  33,   98,  238,  ... A051836 (partial sums of A001296)
0,  1,   9,  42,  140,  378,  ... A051923 (partial sums of A051836)
0,  1,  10,  52,  192, [570], ... A050494 (partial sums of A051923)
----------------------------
therefore a(5) = 570.
		

Crossrefs

Programs

  • Mathematica
    Table[n (n^2 - 2 n + 4) Binomial[2 n, n]/((n + 1) (n + 2)), {n, 0, 27}]
    nmax = 27; CoefficientList[Series[(-4 + 31 x - 66 x^2 + 28 x^3 + (4 - 7 x) (1 - 4 x)^(3/2))/(2 x^2 (1 - 4 x)^(3/2)), {x, 0, nmax}], x]
    nmax = 27; CoefficientList[Series[Exp[2 x] (4 - x + 2 x^2) BesselI[1, 2 x]/x - 2 Exp[2 x] (2 - x) BesselI[0, 2 x], {x, 0, nmax}], x] Range[0, nmax]!
    Table[SeriesCoefficient[x (1 - 3 x + n x)/(1 - x)^(n + 3), {x, 0, n}], {n, 0, 27}]

Formula

O.g.f.: (-4 + 31*x - 66*x^2 + 28*x^3 + (4 - 7*x)*(1 - 4*x)^(3/2))/(2*x^2*(1 - 4*x)^(3/2)).
E.g.f.: exp(2*x)*(4 - x + 2*x^2)*BesselI(1,2*x)/x - 2*exp(2*x)*(2 - x)*BesselI(0,2*x).
a(n) = [x^n] x*(1 - 3*x + n*x)/(1 - x)^(n+3).
a(n) ~ 4^n*sqrt(n)/sqrt(Pi).
D-finite with recurrence: -(n+2)*(961*n-3215)*a(n) +4*(2081*n^2-4414*n-4668)*a(n-1) -28*(320*n-389)*(2*n-3)*a(n-2)=0. - R. J. Mathar, Jan 27 2020

A308488 a(n) is the smallest n-gonal pyramidal number greater than 1 which is also n-gonal; a(n) = 0 when one does not exist.

Original entry on oeis.org

10, 4900, 0, 946, 0, 1045, 0, 175, 23725, 0, 0, 441, 0, 0, 975061, 0, 0, 3578401, 0, 0, 10680265, 0, 0, 27453385, 0, 0, 63016921, 23001, 0, 132361021, 0, 0, 258815701, 0, 0, 477132085, 0, 0, 55202400, 0, 245905, 1408778281, 0, 0, 2286380881, 0, 0, 314755, 0, 0
Offset: 3

Views

Author

Davis Smith, Aug 22 2019

Keywords

Comments

a(n) is the smallest n-gonal number, N, such that, for some m > 1, N is the sum of the first m n-gonal numbers, 0 when one does not exist.
For n > 5, if n == 2 (mod 3), then a(n) > 0 and a(n) <= A080851(n - 2,((n-2)^2)/3 - 3), but there are cases where a(n) > 0 and n !== 2 (mod 3), e.g., a(10).

Crossrefs

Programs

  • PARI
    A308488_vec(lim,J=10^6)={my(
        pyramid(s,n)=(3*n^2 + n^3*(s-2)-n*(s-5))/6,
        check(s)=j=if(lift(Mod(s,3))==2,((s-2)^2)/3-2,J);m=3;while(m<=j,if(ispolygonal(pyramid(s,m),s),return(pyramid(s,m)),m++));0);
    vector(lim,s,check(s+2))}

A363253 a(n) is the smallest n-gonal number which can be represented as the sum of distinct nonzero n-gonal numbers in exactly n ways, or -1 if no such number exists.

Original entry on oeis.org

28, 121, 210
Offset: 3

Views

Author

Ilya Gutkovskiy, May 23 2023

Keywords

Comments

a(8) = 736, a(9) = 969.

Examples

			For n = 3: 1 + 6 + 21 = 3 + 10 + 15 = 28.
		

Crossrefs

A377729 a(n) is the smallest number which can be represented as the sum of n distinct nonzero n-gonal numbers in exactly 2 ways.

Original entry on oeis.org

19, 90, 162, 299, 509, 816, 1248, 1837, 2619, 3634, 4926, 6543, 8537, 10964, 13884, 17361, 21463, 26262, 31834, 38259, 45621, 54008, 63512, 74229, 86259, 99706, 114678, 131287, 149649, 169884, 192116, 216473, 243087, 272094, 303634, 337851, 374893, 414912, 458064, 504509
Offset: 3

Views

Author

Ilya Gutkovskiy, Nov 05 2024

Keywords

Comments

From David A. Corneth, Nov 06 2024: (Start)
a(n) <= (n^4 - 2*n^3 + 38*n^2 - 85*n + 72)/6 for n >= 5. Proof:
A polygonal number is of the form P(m, n) = m/2 * ((n - 2) * m - n + 4).
We have P(n - 5, n) + P(n - 4, n) + P(n, n) = P(n - 6, n) + P(n - 2, n) + P(n - 1, n) = (3*n^3 - 18*n^2 + 21*n) / 2.
This lets us find the upper bound on a(n) by making two lists from 1 through n + 3. From one of them we remove n-2, n-1 and n + 3 and from the other we remove n-3, n+1 and n+2. The sum for remaining polygonal numbers is the same giving an upper bound on a(n) which turns out to be (n^4 - 2*n^3 + 38*n^2 - 85*n + 72)/6 (End)

Examples

			a(3) = 19 = 1 + 3 + 15 = 3 + 6 + 10.
a(4) = 90 = 1^2 + 2^2 + 6^2 + 7^2 = 1^2 + 3^2 + 4^2 + 8^2.
		

Crossrefs

Formula

From David A. Corneth, Nov 06 2024: (Start)
a(n) >= A006484(n).
Conjecture: a(n) = (n^4 - 2*n^3 + 38*n^2 - 85*n + 72)/6 for n >= 5. (End)
Conjectured g.f.: x^3*(19 - 5*x - 98*x^2 + 199*x^3 - 171*x^4 + 72*x^5 - 12*x^6) / (1 - x)^5.

Extensions

a(12)-a(36) from Michael S. Branicky, Nov 06 2024
More terms from David A. Corneth, Nov 10 2024
Previous Showing 71-80 of 82 results. Next