login

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”).

A360663
a(n) is the least integer m >= 3 such that n is a centered m-gonal number.
0
3, 4, 5, 6, 7, 8, 3, 10, 11, 4, 13, 14, 5, 16, 17, 3, 19, 20, 7, 22, 23, 4, 25, 26, 9, 28, 29, 3, 31, 32, 11, 34, 35, 6, 37, 38, 13, 4, 41, 7, 43, 44, 3, 46, 47, 8, 49, 5, 17, 52, 53, 9, 55, 56, 19, 58, 59, 4, 61, 62, 3, 64, 65, 11, 67, 68, 23, 7, 71, 12, 73, 74, 5, 76, 77, 13, 79
OFFSET
4,1
LINKS
Eric Weisstein's World of Mathematics, Centered Polygonal Number.
EXAMPLE
a(16) = 5 since 16 is a centered pentagonal number, but not a centered square or centered triangular number.
MATHEMATICA
seq[len_] := Module[{s = Table[0, {len}], c = 0, k = 3, n, ckn}, While[c < len, n = 2; While[(ckn = k*n*(n - 1)/2 - 2) <= len, If[s[[ckn]] == 0, c++; s[[ckn]] = k]; n++]; n = 4; k++]; s]; seq[100] (* Amiram Eldar, Mar 06 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 15 2023
STATUS
approved