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.

A363367 a(n) is the least integer i >= 0 such that (i + 1) * (i + 2*n) / 2 = p^2, p prime number (A000040), or a(n) = -1 if no such i exists.

This page as a plain text file.
%I A363367 #46 Jul 06 2023 22:05:35
%S A363367 -1,-1,2,4,0,-1,10,12,-1,0,18,-1,1,-1,-1,28,30,-1,-1,36,-1,40,42,-1,1,
%T A363367 0,-1,52,-1,-1,58,60,-1,-1,66,-1,70,72,-1,-1,78,-1,82,-1,-1,88,-1,-1,
%U A363367 -1,0,-1,100,102,-1,106,108,-1,112,-1,-1,1,-1,-1,-1,126,-1,130
%N A363367 a(n) is the least integer i >= 0 such that (i + 1) * (i + 2*n) / 2 =  p^2, p prime number (A000040), or a(n) = -1 if no such i exists.
%C A363367 The shortest arithmetic sequence with initial term n and difference 1 that sums to p^2, p prime number. 2*(n - 1) >= a(n) >= -1.
%F A363367 a(p^2) = 0, p prime number.
%e A363367 n = 2: 2 + 3 + 4 = 9 = 3^2, a(2) = 2.
%e A363367 n = 3: 3 + 4 + 5 + 6 + 7 = 5^2, a(3) = 4.
%e A363367 n = 4: 4 = 2^2, a(4) = 0.
%Y A363367 Cf. A000040, A001248, A006254, A101160, A216244.
%K A363367 sign
%O A363367 0,3
%A A363367 _Ctibor O. Zizka_, Jul 05 2023