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.

A176948 a(n) is the smallest solution x to A176774(x)=n; a(n)=0 if this equation has no solution.

Original entry on oeis.org

3, 4, 5, 0, 7, 8, 24, 27, 11, 33, 13, 14, 42, 88, 17, 165, 19, 20, 60, 63, 23, 69, 72, 26, 255, 160, 29, 87, 31, 32, 315, 99, 102, 208, 37, 38, 114, 805, 41, 123, 43, 44, 132, 268, 47, 696, 475, 50, 150, 304, 53, 159, 162, 56, 168, 340, 59, 177, 61, 62, 615, 1309, 192, 388
Offset: 3

Views

Author

Vladimir Shevelev, Apr 29 2010

Keywords

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

Examples

			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
		

Crossrefs

Programs

  • 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 *)

Formula

a(p) = p if p is any odd prime.

Extensions

More terms from R. J. Mathar, May 03 2010