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.

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

This page as a plain text file.
%I A274967 #68 Apr 27 2025 08:02:41
%S A274967 77,119,143,161,187,203,209,221,299,319,323,329,371,377,391,407,413,
%T A274967 437,473,493,497,517,527,533,539,551,581,583,589,611,623,629,649,667,
%U A274967 689,707,713,731,737,749,767,779,791,799,803,817,851,869,893,899,901,913
%N A274967 Odd composite numbers n which are not m-gonal number for 3 <= m < n.
%C A274967 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.
%C A274967 Odd composite numbers n for which A176948(n) = n.
%C A274967 All odd composite n are coprime to 30 (see next comment) and have smallest prime factor >= 7, e.g.
%C A274967    77 =   7*11, 119 =  7*17, 143 = 11*13, 161 =  7*23,
%C A274967   187 =  11*17, 203 =  7*29, 209 = 11*19, 221 = 13*17,
%C A274967   299 =  13*23, 319 = 11*29, 323 = 17*19, 329 =  7*47,
%C A274967   371 =   7*53, 377 = 13*29, 391 = 17*23, 407 = 11*37,
%C A274967   413 =   7*59, 437 = 19*23, 473 = 11*43, 493 = 17*29,
%C A274967   497 =   7*71, 517 = 11*47, 527 = 17*31, 533 = 13*41,
%C A274967   539 = 7*7*11, 551 = 19*29, 581 =  7*83, 583 = 11*53,
%C A274967   589 =  19*31, 611 = 13*47, 623 =  7*89, 629 = 17*37,
%C A274967   649 =  11*59, 667 = 23*29, 689 = 13*53, 707 = 7*101,
%C A274967   713 =  23*31, 731 = 17*43, 737 = 11*67, 749 = 7*107,
%C A274967   767 =  13*59, 779 = 19*41, 791 = 7*113, 799 = 17*47,
%C A274967   803 =  11*73, 817 = 19*43, 851 = 23*37, 869 = 11*79,
%C A274967   893 =  19*47, 899 = 29*31, 901 = 17*53, 913 = 11*83.
%C A274967 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.
%C A274967 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.
%C A274967 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
%C A274967     k = {(m-4) + sqrt[(m-4)^2 + 8*(m-2)*n]}/[2*(m-2)] with m = 3, thus
%C A274967     k <= (1/2)*{-1 + sqrt[1 + 8*n]}.
%C A274967 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
%C A274967     m = [2n + 2*k*(k-2)]/[k*(k-1)] with k = 3, thus m <= (n+3)/3.
%H A274967 Chai Wah Wu, <a href="/A274967/b274967.txt">Table of n, a(n) for n = 1..10000</a>
%H A274967 OEIS Wiki, <a href="/wiki/Polygonal_numbers">Polygonal numbers</a>
%e A274967 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]}.
%t A274967 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 *)
%o A274967 (Sage)
%o A274967 def is_a(n):
%o A274967     if is_even(n): return False
%o A274967     if is_prime(n): return False
%o A274967     for m in (3..(n+3)//3):
%o A274967         if pari('ispolygonal')(n, m):
%o A274967             return False
%o A274967     return True
%o A274967 print([n for n in (3..913) if is_a(n)]) # _Peter Luschny_, Jul 28 2016
%o A274967 (Python)
%o A274967 from sympy import isprime
%o A274967 A274967_list = []
%o A274967 for n in range(3,10**6,2):
%o A274967     if not isprime(n):
%o A274967         k = 3
%o A274967         while k*(k+1) <= 2*n:
%o A274967             if not (2*(k*(k-2)+n)) % (k*(k - 1)):
%o A274967                 break
%o A274967             k += 1
%o A274967         else:
%o A274967             A274967_list.append(n) # _Chai Wah Wu_, Jul 28 2016
%Y A274967 Cf. A176774, A176948, A176949, A274968.
%K A274967 nonn,easy
%O A274967 1,1
%A A274967 _Daniel Forgues_, Jul 12 2016
%E A274967 a(10)-a(52) from _Giovanni Resta_, Jul 13 2016