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.

A363709 For n >= 0, a(n) is the least integer i >= 0 such that n + (n + 1) + ... + (n + i) is a prime number or a(n) = -1 if no such i exists.

This page as a plain text file.
%I A363709 #11 Jul 06 2023 22:06:20
%S A363709 2,1,0,0,-1,0,1,0,1,1,-1,0,-1,0,1,1,-1,0,1,0,1,1,-1,0,-1,-1,1,-1,-1,0,
%T A363709 1,0,-1,1,-1,1,1,0,-1,1,-1,0,-1,0,1,-1,-1,0,1,-1,1,1,-1,0,1,-1,1,-1,
%U A363709 -1,0,-1,0,-1,1,-1,1,-1,0,1,1,-1,0,-1,0,1,1,-1,-1,1,0,-1
%N A363709 For n >= 0, a(n) is the least integer i >= 0 such that n + (n + 1) + ... + (n + i) is a prime number or a(n) = -1 if no such i exists.
%C A363709 Shortest arithmetic sequence with initial term n and difference 1 that sums to a prime number.
%C A363709 For n = 0, a(n) = 2.
%C A363709 For n >= 1, a(n) < 2.
%C A363709 For n in A053176 or A005384, a(n) = 0.
%C A363709 For n in A067812, a(n) = 1.
%C A363709 For n in A077654, a(n) = -1.
%F A363709 ((i + 1)*(i + 2*n))/2 = p, p prime number.
%e A363709 n = 4: no such i exists, thus a(4) = -1.
%e A363709 n = 5: n is prime, i = 0, thus a(5) = 0.
%e A363709 n = 6: n + (n + 1) = 6 + 7 = 13 is prime, i = 1, thus a(6) = 1.
%Y A363709 Cf. A000040, A005384, A053176, A067812, A077654.
%K A363709 sign
%O A363709 0,1
%A A363709 _Ctibor O. Zizka_, Jun 17 2023