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.

A270541 a(n) = A001359(n) - A001359(n+1) - A001359(n+2) + A001359(n+3).

This page as a plain text file.
%I A270541 #22 Jun 14 2025 19:31:15
%S A270541 4,6,6,6,0,12,-6,0,6,0,0,-24,18,6,0,0,0,24,42,-24,-42,48,18,-30,-30,
%T A270541 -6,0,126,-6,-144,18,18,108,-12,-120,0,12,48,48,-12,-66,-36,6,96,6,
%U A270541 -78,-18,90,6,-72,18,-24,36,60,-60,-30,12,-6,12,6,-24,-30,12,-12,78,18,-54,0,0,138,0,-102,-12,-42
%N A270541 a(n) = A001359(n) - A001359(n+1) - A001359(n+2) + A001359(n+3).
%C A270541 6*k appears for the form of a(n) for n > 1.
%C A270541 What is the most repeated value of a(n)?
%C A270541 See A270535 for the position of 0's in this sequence.
%H A270541 Amiram Eldar, <a href="/A270541/b270541.txt">Table of n, a(n) for n = 1..10000</a>
%F A270541 a(n) = A053319(n+2) - A053319(n).
%e A270541 a(1) = 4 because a(1) = A001359(1) - A001359(2) - A001359(3) + A001359(4) = 3 - 5 - 11 + 17 = 4.
%t A270541 s = Select[Prime@Range[10^6], PrimeQ[# + 2] &]; Table[s[[n]] - s[[n + 1]] - s[[n + 2]] + s[[n + 3]], {n, 74}] (* _Michael De Vlieger_, Mar 19 2016, after _Robert G. Wilson v_ at A001359 *)
%t A270541 #[[1]]-#[[2]]-#[[3]]+#[[4]]&/@Partition[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]]==2&][[;;,1]],4,1] (* _Harvey P. Dale_, Jun 14 2025 *)
%o A270541 (PARI) t(n, p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
%o A270541 a(n) = t(n) + t(n+3) - t(n+1) - t(n+2);
%o A270541 for(n=1, 200, print1(a(n), ", "));
%Y A270541 Cf. A001359, A006512, A014574, A053319.
%K A270541 sign
%O A270541 1,1
%A A270541 _Altug Alkan_, Mar 18 2016