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.

A365445 a(n) is the index of the least prime that is also a centered n-gonal number, or -1 if none exists.

This page as a plain text file.
%I A365445 #41 Feb 16 2025 08:34:06
%S A365445 8,3,11,4,14,-1,-1,5,19,6,22,14,36,7,27,8,43,18,31,9,34,21,36,22,38,
%T A365445 10,795,11,64,25,46,27,47,12,48,50,183,13,394,14,83,121,58,15,61,169,
%U A365445 94,36,63,16,489,38,67,68,105,17,623,18,73,74,75,44,347
%N A365445 a(n) is the index of the least prime that is also a centered n-gonal number, or -1 if none exists.
%H A365445 Ilya Gutkovskiy, <a href="/A365445/a365445.jpg">Scatterplot of a(n) up to n=10000</a>
%H A365445 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CenteredPolygonalNumber.html">Centered Polygonal Number</a>
%F A365445 a(n) = A000720(A365815(n)). - _Michel Marcus_, Sep 27 2023
%t A365445 Table[PrimePi[SelectFirst[n # (# + 1)/2 + 1 & /@ Range[100], PrimeQ]], {n, 3, 65}] /. (PrimePi[Missing["NotFound"]] -> -1)
%o A365445 (PARI) a(n) = if ((n==8) || (n==9), return(-1)); my(k=0, p); while (!isprime(p=1+n*k*(k-1)/2), k++); primepi(p); \\ _Michel Marcus_, Sep 27 2023
%Y A365445 Centered k-gonal primes listed in A276261.
%Y A365445 Cf. A000040, A000720, A101321, A365815.
%K A365445 sign
%O A365445 3,1
%A A365445 _Ilya Gutkovskiy_, Sep 25 2023