%I #20 Sep 27 2023 09:43:39
%S 19,5,31,7,43,-1,-1,11,67,13,79,43,151,17,103,19,191,61,127,23,139,73,
%T 151,79,163,29,6091,31,311,97,199,103,211,37,223,229,1093,41,2707,43,
%U 431,661,271,47,283,1009,491,151,307,53,3499,163,331,337,571,59,4603,61
%N a(n) is the least centered n-gonal prime, or -1 if none exists.
%H Ilya Gutkovskiy, <a href="/A365815/a365815.jpg">Scatterplot of a(n) up to n=10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CenteredPolygonalNumber.html">Centered Polygonal Number</a>
%t Table[SelectFirst[n # (# + 1)/2 + 1 & /@ Range[100], PrimeQ], {n, 3, 60}] /. (Missing["NotFound"] -> -1)
%o (PARI) a(n) = if ((n==8) || (n==9), return(-1)); my(k=0, p); while (!isprime(p=1+n*k*(k-1)/2), k++); p; \\ _Michel Marcus_, Sep 27 2023
%Y Centered k-gonal primes listed in A276261.
%Y Cf. A000040, A101321, A365445.
%K sign
%O 3,1
%A _Ilya Gutkovskiy_, Sep 25 2023