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