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.

A131694 Numbers k such that abs(S(k)) = A008347(k) is prime, where S(k) = S(k-1) + A000040(k)*(-1)^k; S(0) = 0.

This page as a plain text file.
%I A131694 #8 Oct 04 2024 11:22:50
%S A131694 1,4,6,8,10,12,18,28,32,38,42,46,50,52,54,64,68,70,72,74,76,86,88,98,
%T A131694 100,110,126,128,130,140,146,152,162,192,202,214,226,242,252,258,264,
%U A131694 270,290,294,304,308,314,316,320,322,332,342,348,352,358,360
%N A131694 Numbers k such that abs(S(k)) = A008347(k) is prime, where S(k) = S(k-1) + A000040(k)*(-1)^k; S(0) = 0.
%C A131694 The sequence include as first term the only case where S(k) = -1 times a prime: S(1) = -2.
%e A131694 S(3) = ((0+2*-1)+3*1)+5*-1 = -4, S(4) = -4 + 7*1 = 3 is prime, hence 4 is a term.
%e A131694 S(5) = ((((0+2*-1)+3*1)+5*-1)+7*1)+11*-1 = -8, S(6) = -8 + 13*1 = 5 is prime, hence 6 is a term.
%t A131694 S=0; Do[S=S+Prime[n]*(-1)^n; If[PrimeQ[S]==True, Print[n]], {n, 1, 10^3, 1}]
%Y A131694 Cf. A008347, A066033, A000040.
%K A131694 nonn
%O A131694 1,2
%A A131694 _Manuel Valdivia_, Oct 03 2007