A176949 Composite numbers n for which A176948(n) = n.
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
Keywords
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
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
- OEIS Wiki, Polygonal numbers
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
Comments