OFFSET
3,1
COMMENTS
A greedy inverse function to A176774.
Conjecture: For every n >= 4, except for n=6, there exists an n-gonal number N which is not k-gonal for 3 <= k < n.
This means that the sequence contains only one 0: a(6)=0. For n=6 it is easy to prove that every hexagonal number (A000384) is also triangular (A000217), i.e., N does not exist. - Vladimir Shevelev, Apr 30 2010
LINKS
Chai Wah Wu, Table of n, a(n) for n = 3..10000
FORMULA
a(p) = p if p is any odd prime.
EXAMPLE
For n=9, 24 is a nonagonal number, but not an octagonal number, heptagonal number, hexagonal number, etc. The smaller nonagonal number 9 is also a square number. Thus, a(9) = 24. - Michael B. Porter, Jul 16 2016
MAPLE
A139601 := proc(k, n) option remember ; n/2*( (k-2)*n-k+4) ; end proc:
A176774 := proc(n) option remember ; local k, m, pol ; for k from 3 do for m from 0 do pol := A139601(k, m) ; if pol = n then return k ; elif pol > n then break; end if; end do: end do: end proc:
A176948 := proc(n) if n = 6 then 0; else for x from 3 do if A176774(x)= n then return x ; end if; end do: end if; end proc:
seq(A176948(n), n=3..80) ; # R. J. Mathar, May 03 2010
MATHEMATICA
A176774[n_] := A176774[n] = (m = 3; While[Reduce[k >= 1 && n == k (k (m - 2) - m + 4)/2, k, Integers] == False, m++]; m); a[6] = 0; a[p_?PrimeQ] := p; a[n_] := (x = 3; While[A176774[x] != n, x++]; x); Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 3, 100}] (* Jean-François Alcover, Sep 04 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 29 2010
EXTENSIONS
More terms from R. J. Mathar, May 03 2010
STATUS
approved