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.
%I A176949 #91 Aug 16 2025 21:09:04 %S A176949 4,8,14,20,26,32,38,44,50,56,62,68,74,77,80,86,98,104,110,116,119,122, %T A176949 128,134,140,143,146,152,158,161,164,170,182,187,188,194,200,203,206, %U A176949 209,212,218,221,224,230,236,242,248,254,266,272,278,284,290,296,299,302 %N A176949 Composite numbers n for which A176948(n) = n. %C A176949 If p >= 3 is prime, then A176948(p) = p. The sequence lists composite numbers with this property. %C A176949 It is interesting that there is a large overlap with terms in A140164 (but there are exceptions, e.g., 77). %C A176949 From _Daniel Forgues_, Jul 15 2016: (Start) %C A176949 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. %C A176949 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. %C A176949 Since we are looking for solutions of (m-2)*k^2 - (m-4)*k - 2*n = 0, %C A176949 with m >= 3 and k >= 3, the largest order k we need to consider is %C A176949 k = {(m-4) + sqrt[(m-4)^2 + 8*(m-2)*n]}/[2*(m-2)] with m = 3, thus %C A176949 k <= (1/2)*{-1 + sqrt[1 + 8*n]}. %C A176949 Or, since we are looking for solutions of 2n = m*k*(k-1) - 2*k*(k-2), %C A176949 with m >= 3 and k >= 3, the largest m we need to consider is %C A176949 m = [2n + 2*k*(k-2)]/[k*(k-1)] with order k = 3, thus m <= (n+3)/3. %C A176949 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 A176949 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. %C A176949 a(1) = 4 is the only square number: 4-gonal with order k = 2. (End) %C A176949 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 %C A176949 From _Jonathan Dushoff_, Apr 05 2022: (Start) %C A176949 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. %C A176949 Note that the 2nd through 13th terms are in arithmetic progression. %C A176949 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. %C A176949 In fact, the first number to break the arithmetic progression is the first product of distinct primes > 5. %C A176949 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)). %C A176949 The first 6x+2 composite not in the list is order-8 pentagonal number 92. (End) %H A176949 Giovanni Resta, <a href="/A176949/b176949.txt">Table of n, a(n) for n = 1..10000</a> %H A176949 OEIS Wiki, <a href="/wiki/Polygonal_numbers">Polygonal numbers</a> %e A176949 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 %t A176949 Select[Range[302], CompositeQ@ # && FindInstance[n*(4 + n*(s-2) - s)/2 == # && s >= 3 && n >= 3, {s, n}, Integers] == {} &] (* _Giovanni Resta_, Jul 13 2016 *) %o A176949 (Sage) %o A176949 def is_a(n): %o A176949 if is_prime(n): return False %o A176949 for m in (3..(n+3)//3): %o A176949 if pari('ispolygonal')(n, m): %o A176949 return False %o A176949 return True %o A176949 print([n for n in (3..302) if is_a(n)]) # _Peter Luschny_, Jul 28 2016 %o A176949 (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 %Y A176949 Cf. A175873, A176744, A176747, A176774, A176775, A176874, A176948, A274967, A274968. %K A176949 nonn %O A176949 1,1 %A A176949 _Vladimir Shevelev_, Apr 29 2010, Apr 30 2010 %E A176949 Offset corrected and sequence extended by _R. J. Mathar_, May 03 2010