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 11-19 of 19 results.

A176874 Minimal nonnegative integer that cannot be represented as the sum of an m-gonal and a k-gonal number for any k,m less than n.

Original entry on oeis.org

0, 5, 23, 62, 62, 723, 1578, 1578, 8139, 39644, 94323, 94323, 1317783, 1680515, 2025699, 3205598, 23003999, 113333163, 170717819, 1710518799, 3608109348, 16655876439, 24090452279
Offset: 3

Views

Author

Vladimir Shevelev and Max Alekseyev, Apr 27 2010

Keywords

Comments

Indices of records in A176873 (with repetitions).

Crossrefs

Formula

a(n) = smallest integer s such that A176873(s) >= n.

Extensions

Edited by N. J. A. Sloane, Apr 29 2010
a(19)-a(22) from Jon E. Schoenfield, Aug 08 2010
a(23)-a(25) from Donovan Johnson, Jan 24 2011

A176949 Composite numbers n for which A176948(n) = n.

Original entry on oeis.org

4, 8, 14, 20, 26, 32, 38, 44, 50, 56, 62, 68, 74, 77, 80, 86, 98, 104, 110, 116, 119, 122, 128, 134, 140, 143, 146, 152, 158, 161, 164, 170, 182, 187, 188, 194, 200, 203, 206, 209, 212, 218, 221, 224, 230, 236, 242, 248, 254, 266, 272, 278, 284, 290, 296, 299, 302
Offset: 1

Views

Author

Vladimir Shevelev, Apr 29 2010, Apr 30 2010

Keywords

Comments

If p >= 3 is prime, then A176948(p) = p. The sequence lists composite numbers with this property.
It is interesting that there is a large overlap with terms in A140164 (but there are exceptions, e.g., 77).
From Daniel Forgues, Jul 15 2016: (Start)
Composite numbers n which are not of form (k/2)*[(m-2)*k - (m-4)] for any m >= 3 and k >= 3, thus not m-gonal numbers for any order k >= 3.
An m-gonal number, m >= 3, i.e., of the form n = (k/2)*[(m-2)*k - (m-4)], yields a nontrivial factorization of n if and only if k >= 3.
Since we are looking for solutions of (m-2)*k^2 - (m-4)*k - 2*n = 0,
with m >= 3 and k >= 3, the largest order k we need to consider is
k = {(m-4) + sqrt[(m-4)^2 + 8*(m-2)*n]}/[2*(m-2)] with m = 3, thus
k <= (1/2)*{-1 + sqrt[1 + 8*n]}.
Or, since we are looking for solutions of 2n = m*k*(k-1) - 2*k*(k-2),
with m >= 3 and k >= 3, the largest m we need to consider is
m = [2n + 2*k*(k-2)]/[k*(k-1)] with order k = 3, thus m <= (n+3)/3.
Composite numbers n which are divisible by 3 are m-gonal numbers of order 3, with m = (n + 3)/3. Thus all a(n) are coprime to 3.
Odd composite numbers n which are divisible by 5 are m-gonal numbers of order 5, with m = (n + 15)/10. Thus all odd a(n) are coprime to 5.
a(1) = 4 is the only square number: 4-gonal with order k = 2. (End)
An integer n which is congruent to k (mod t_{k-1}) with 3 <= t_{k-1} < n, i.e. n = j * t_{k-1} + k with k >= 3 and j >= 1, is an m-gonal number of order k, with m = j + 2, where t_{k-1} is a triangular number. If all the congruence tests fail, a composite n belongs to this sequence. - Daniel Forgues, Aug 02 2016
From Jonathan Dushoff, Apr 05 2022: (Start)
All numbers n>2 are trivially n-gonal numbers, and will thus have A176948(n)=n unless they have a nontrivial polygonal decomposition. Thus this is just the sequence of non-polygonal composite numbers.
Note that the 2nd through 13th terms are in arithmetic progression.
Some reasons: many of the smaller odd numbers are prime (and thus don't appear); numbers of the form 6x (or 6x+3) are always order-3 numbers; numbers of the form 6x+4 are always order-4 numbers; small odd composites not divisible by 3 are usually divisible by 5, and are thus order-5 numbers.
In fact, the first number to break the arithmetic progression is the first product of distinct primes > 5.
Conversely, 6x+2 numbers cannot be order-3 or -6 numbers (those are divisible by 3); order-4 numbers (all == 4 (mod 6)); order-5 numbers (all odd); or order-7 numbers (all == 1 (mod 3)).
The first 6x+2 composite not in the list is order-8 pentagonal number 92. (End)

Examples

			8 is in the sequence since it is composite and is an octagonal number, but not a heptagonal number, hexagonal number, pentagonal number, etc. 10 is not in the sequence because even though it is composite and a decagonal number, it is also a triangular number: 10 = 1 + 2 + 3 + 4. - _Michael B. Porter_, Jul 16 2016
		

Crossrefs

Programs

  • Mathematica
    Select[Range[302], CompositeQ@ # && FindInstance[n*(4 + n*(s-2) - s)/2 == # && s >= 3 && n >= 3, {s, n}, Integers] == {} &] (* Giovanni Resta, Jul 13 2016 *)
  • PARI
    listc(nn) = {forcomposite(c=1, nn, sp = c; forstep(k=c, 3, -1, if (ispolygonal(c, k), sp=k);); if (sp == c, print1(c, ", ")););} \\ Michel Marcus, Sep 06 2016
  • Sage
    def is_a(n):
        if is_prime(n): return False
        for m in (3..(n+3)//3):
            if pari('ispolygonal')(n, m):
                return False
        return True
    print([n for n in (3..302) if is_a(n)]) # Peter Luschny, Jul 28 2016
    

Extensions

Offset corrected and sequence extended by R. J. Mathar, May 03 2010

A245648 The largest member 'c' of the Pythagorean triples (a,b,c) ordered by increasing c, where the triples consist of a triangular number, a square number and a pentagonal number.

Original entry on oeis.org

5, 15, 145, 2775
Offset: 1

Views

Author

Ivan N. Ianakiev, Jul 28 2014

Keywords

Comments

Next term comes from a triple with c > 10^5.
From Michel Marcus, Apr 08 2021: (Start)
The 4 known triples that satisfy the requisite are [3,4,5], [9,12,15], [100, 105, 145], [900, 2625, 2775].
Let po(n) be A176774(n), the least polygonality of a number.
po([3,4,5]) = [3,4,5]; <-----
po([9,12,15]) = [4,5,3];
po([100,105,145]) = [4,3,5]; <-----
po([900,2625,2775]) = [4,5,3].
So for the 2 highlighted triples, we have a-gonal^2 + b-gonal^2 = c-gonal^2. Are there other Pythagorean triples with the same property?
Let nb(n) be A177025(n) is the number of ways to represent n as a polygonal number.
nb([3,4,5]) = [1,1,1]; <-----
nb([9,12,15]) = [4,5,3];
nb([100,105,145]) = [4,3,5];
nb([900,2625,2775]) = [4,5,3].
So for the highlighted triple, we get [1,1,1]. Are there other Pythagorean triples with the same property? (End)
Regarding the first question by Michel Marcus, if such triple [x,y,z] exists, then z > 10^4. Regarding his second question, if such triple exists, then z > 10^7. - Ivan N. Ianakiev, Dec 16 2021
a(5) > 10^11, if it exists. - Giovanni Resta, Apr 15 2021

Examples

			a(1) = 5 as the first such Pythagorean triple is (3,4,5). The next three triples are (9,12,15), (100,105,145), (900,2625,2775).
		

Crossrefs

Programs

  • Mathematica
    n=10^3;ppt={};list={};pos=1;t[x_]:=(IntegerPart[Sqrt[2*x]])*(IntegerPart[Sqrt[2*x]]+1)/2;ls[x_]:=Length[Sqrt[x]];lis[x_]:=Length[IntegerPart[Sqrt[x]]];lp[x_]:=Length[(Sqrt[24*x+1]+1)/6];lip[x_]:=Length[IntegerPart[(Sqrt[24*x+1]+1)/6]];Do[y=x+1;z=y+1;While[z<=n,While[z^2
    				

A274967 Odd composite numbers n which are not m-gonal number for 3 <= m < n.

Original entry on oeis.org

77, 119, 143, 161, 187, 203, 209, 221, 299, 319, 323, 329, 371, 377, 391, 407, 413, 437, 473, 493, 497, 517, 527, 533, 539, 551, 581, 583, 589, 611, 623, 629, 649, 667, 689, 707, 713, 731, 737, 749, 767, 779, 791, 799, 803, 817, 851, 869, 893, 899, 901, 913
Offset: 1

Views

Author

Daniel Forgues, Jul 12 2016

Keywords

Comments

An m-gonal number, m >= 3, i.e. of form n = (k/2)*[(m-2)*k - (m-4)], yields a nontrivial factorization of n if and only if of order k >= 3.
Odd composite numbers n for which A176948(n) = n.
All odd composite n are coprime to 30 (see next comment) and have smallest prime factor >= 7, e.g.
77 = 7*11, 119 = 7*17, 143 = 11*13, 161 = 7*23,
187 = 11*17, 203 = 7*29, 209 = 11*19, 221 = 13*17,
299 = 13*23, 319 = 11*29, 323 = 17*19, 329 = 7*47,
371 = 7*53, 377 = 13*29, 391 = 17*23, 407 = 11*37,
413 = 7*59, 437 = 19*23, 473 = 11*43, 493 = 17*29,
497 = 7*71, 517 = 11*47, 527 = 17*31, 533 = 13*41,
539 = 7*7*11, 551 = 19*29, 581 = 7*83, 583 = 11*53,
589 = 19*31, 611 = 13*47, 623 = 7*89, 629 = 17*37,
649 = 11*59, 667 = 23*29, 689 = 13*53, 707 = 7*101,
713 = 23*31, 731 = 17*43, 737 = 11*67, 749 = 7*107,
767 = 13*59, 779 = 19*41, 791 = 7*113, 799 = 17*47,
803 = 11*73, 817 = 19*43, 851 = 23*37, 869 = 11*79,
893 = 19*47, 899 = 29*31, 901 = 17*53, 913 = 11*83.
Composite numbers n which are divisible by 3 are m-gonal numbers of order 3, with m = (n + 3)/3. Thus all a(n) are coprime to 3.
Odd composite numbers n which are divisible by 5 are m-gonal numbers of order 5, with m = (n + 15)/10. Thus all a(n) are coprime to 5.
Since we are looking for solutions of (m-2)*k^2 - (m-4)*k - 2*n = 0, with m >= 3 and k >= 3, the largest k we need to consider is
k = {(m-4) + sqrt[(m-4)^2 + 8*(m-2)*n]}/[2*(m-2)] with m = 3, thus
k <= (1/2)*{-1 + sqrt[1 + 8*n]}.
Or, since we are looking for solutions of 2n = m*k*(k-1) - 2*k*(k-2), with m >= 3 and k >= 3, the largest m we need to consider is
m = [2n + 2*k*(k-2)]/[k*(k-1)] with k = 3, thus m <= (n+3)/3.

Examples

			77 is in this sequence because 77 is trivially a 77-gonal number of order k = 2, but not an m-gonal number for 3 <= k <= (1/2)*{-1 + sqrt[1 + 8*77]}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500]2+1, ! PrimeQ[#] && FindInstance[n*(4 + n*(s-2)-s)/2 == # && s >= 3 && n >= 3, {s, n}, Integers] == {} &] (* Giovanni Resta, Jul 13 2016 *)
  • Python
    from sympy import isprime
    A274967_list = []
    for n in range(3,10**6,2):
        if not isprime(n):
            k = 3
            while k*(k+1) <= 2*n:
                if not (2*(k*(k-2)+n)) % (k*(k - 1)):
                    break
                k += 1
            else:
                A274967_list.append(n) # Chai Wah Wu, Jul 28 2016
  • Sage
    def is_a(n):
        if is_even(n): return False
        if is_prime(n): return False
        for m in (3..(n+3)//3):
            if pari('ispolygonal')(n, m):
                return False
        return True
    print([n for n in (3..913) if is_a(n)]) # Peter Luschny, Jul 28 2016
    

Extensions

a(10)-a(52) from Giovanni Resta, Jul 13 2016

A176873 Smallest possible integer m>=3 such that n is the sum of an m-gonal number and a k-gonal number for some k<=m.

Original entry on oeis.org

3, 3, 3, 3, 3, 4, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 4, 3, 4, 3, 3, 3, 5, 3, 3, 4, 3, 3, 3, 3, 3, 4, 5, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 4, 3, 3, 5, 3, 3, 4, 3, 4, 4, 4, 3, 3, 3, 3, 4, 3, 3, 7, 5, 3, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 4, 3, 4, 3, 3, 4, 3, 4, 3, 3, 4, 5, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 3, 4, 3, 3, 3, 3, 4, 4
Offset: 0

Views

Author

Max Alekseyev, Apr 27 2010

Keywords

Crossrefs

Programs

  • PARI
    a(n)=if(ispolygonal(n,3) || ispolygonal(n-1,3), return(3)); for(m=3,if(n>5,(n+1)\2,4), my(i=2,t); while((t=n-(m-2)*binomial(i,2)-i)>=0, for(k=3,m, if(ispolygonal(t,k), return(m))); i++)) \\ Charles R Greathouse IV, Dec 11 2015

Formula

a(n) = min max(A176774(i),A176774(n-i)), where min is taken over i=0,1,...,n under the assumption that A176774(2) = +infinity.

A333914 a(n) is the least integer m >= 3 such that n is m-gonal pyramidal number.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 3, 10, 11, 12, 4, 14, 15, 16, 5, 18, 3, 20, 6, 22, 23, 24, 7, 26, 27, 28, 4, 30, 31, 32, 9, 3, 35, 36, 10, 38, 5, 40, 11, 42, 43, 44, 12, 46, 47, 48, 6, 50, 51, 52, 14, 4, 3, 56, 15, 58, 7, 60, 16, 62, 63, 64, 17, 66, 67, 68, 8, 70, 71, 72, 19, 5, 75, 76, 20, 78, 9
Offset: 4

Views

Author

Ilya Gutkovskiy, Apr 09 2020

Keywords

Examples

			a(18) = 5 since 18 is a pentagonal pyramidal number, but not a square pyramidal or tetrahedral number.
		

Crossrefs

A344083 a(n) = f(x)+f(y)+f(z), where (x,y,h) is the n-th Pythagorean triple listed in (A046083, A046084, A009000), and f(m)=A176775(m) is the index of m as k-gonal number for the smallest possible k.

Original entry on oeis.org

6, 9, 7, 11, 9, 9, 12, 10, 9, 10, 9, 11, 18, 10, 16, 9, 9, 20, 9, 7, 18, 9, 18, 15, 11, 14, 7, 12, 10, 13, 12, 7, 12, 15, 12, 17, 14, 18, 13, 9, 13, 14, 15, 10, 9, 7, 9, 21, 12, 10, 15, 23, 7, 9, 12, 20, 9, 18, 17, 28, 14, 16, 7, 21, 18, 24, 21, 21, 20, 16, 25
Offset: 1

Views

Author

Michel Marcus, May 09 2021

Keywords

Comments

6 is the minimum possible value, and A176775(3,4,5) gives this minimum.
Conjecture: there are no other Pythagorean triples that give this minimum. In other words, it is the only triple with 3 A090467 terms.

Crossrefs

Programs

  • PARI
    tp(n) = my(k=3); while( !ispolygonal(n,k), k++); k; \\ A176774
    itp(n) = my(m=tp(n)); (m-4+sqrtint((m-4)^2+8*(m-2)*n)) / (2*m-4); \\ A176775
    f(v) = vecsum(apply(itp, v));
    list(lim) = {my(v=List(), m2, s2, h2, h); for(middle=4, lim-1, m2=middle^2; for(small=1, middle, s2=small^2; if(issquare(h2=m2+s2, &h), if(h>lim, break); listput(v, [h, middle, small]);););); v = vecsort(Vec(v)); apply(f, v);}

A373921 The last entry in the difference table for {the n-th row of A177028 arranged in increasing order}.

Original entry on oeis.org

3, 4, 5, 3, 7, 8, 5, 7, 11, 7, 13, 14, 6, 12, 17, 11, 19, 20, 8, 17, 23, 15, 21, 26, 17, 19, 29, 19, 31, 32, 21, 27, 30, 6, 37, 38, 25, 32, 41, 27, 43, 44, 12, 37, 47, 31, 45, 50, 20, 42, 53, 35, 44, 56, 37, 47, 59, 39, 61, 62, 41, 44, 57, 12, 67, 68, 45, 49, 71, 47, 73, 74, 32
Offset: 3

Views

Author

Robert G. Wilson v, Jun 22 2024

Keywords

Comments

Inspired by A342772 and A187202.
The n-th row of A177028 are all integers k for which n is a k-gonal number.
As an example: row 10 of A177028 contain 3 and 10, because 10 is a 10-gonal number but also a triangular number.
-3n/2 < a(n) <= n.
a(n) = n if n is an odd prime (A065091), an odd composite number in A274967, or even numbers in A274968.
a(n) = 0: 231, tested up to 150000.
a(n) < 0: 441, 540, 561, 1089, 1128, 1296, 1521, 1701, 1716, 1881, 2016, 2211, 2541, 2556, 2601, ..., .
a(n) is negative less than 1% of the time.

Examples

			a(15) = 6, because the 15th row of A177028 is {3,6,15} -> {3,9} -> {6};
a(36) = 6, because the 36th row of A177028 is {3,4,13,36} -{1,9,23} - {8,14} -> {6};
a(225) = 37, because the 225th row of A177028 is {4,8,24,76,225} -> {4,16,52,149} -> {12,36,97} -> {24,61} -> {37};
a(561) = -82, because the 561st row of A177028 is {3,6,12,39,188,561} -> {3,6,27,149,373} -> {3,21,122,224} -> {18,101,102}, {83,1} -> {-82}; etc.
		

Crossrefs

Programs

  • Mathematica
    planeFigurateQ[n_, r_] := IntegerQ[((r -4) + Sqrt[(r -4)^2 + 8n (r -2)])/(2 (r -2))]; a[n_] := Block[{pg = Select[ Range[3, n], planeFigurateQ[n, #] &]}, Differences[pg, Length@ pg - 1][[1]]]; Array[a, 73, 3]

A360663 a(n) is the least integer m >= 3 such that n is a centered m-gonal number.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 3, 10, 11, 4, 13, 14, 5, 16, 17, 3, 19, 20, 7, 22, 23, 4, 25, 26, 9, 28, 29, 3, 31, 32, 11, 34, 35, 6, 37, 38, 13, 4, 41, 7, 43, 44, 3, 46, 47, 8, 49, 5, 17, 52, 53, 9, 55, 56, 19, 58, 59, 4, 61, 62, 3, 64, 65, 11, 67, 68, 23, 7, 71, 12, 73, 74, 5, 76, 77, 13, 79
Offset: 4

Views

Author

Ilya Gutkovskiy, Feb 15 2023

Keywords

Examples

			a(16) = 5 since 16 is a centered pentagonal number, but not a centered square or centered triangular number.
		

Crossrefs

Programs

  • Mathematica
    seq[len_] := Module[{s = Table[0, {len}], c = 0, k = 3, n, ckn}, While[c < len, n = 2; While[(ckn = k*n*(n - 1)/2 - 2) <= len, If[s[[ckn]] == 0, c++; s[[ckn]] = k]; n++]; n = 4; k++]; s]; seq[100] (* Amiram Eldar, Mar 06 2023 *)
Previous Showing 11-19 of 19 results.