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.

A191472 a(n) = 2*prime(n+2) - prime(n+1) - prime(n).

This page as a plain text file.
%I A191472 #23 Jul 31 2024 01:34:17
%S A191472 5,6,10,8,10,8,10,16,10,14,14,8,10,16,18,10,14,14,8,14,14,16,22,16,8,
%T A191472 10,8,10,32,22,16,10,22,14,14,18,14,16,18,10,22,14,10,8,26,36,20,8,10,
%U A191472 16,10,22,22,18,18,10,14,14,8,22,38,22,8,10,32,26,26,14
%N A191472 a(n) = 2*prime(n+2) - prime(n+1) - prime(n).
%C A191472 For n > 2, all terms >= 8 and all even integers are possible except for 12.
%H A191472 Zak Seidov, <a href="/A191472/b191472.txt">Table of n, a(n) for n = 1..1000</a>
%H A191472 Charles R Greathouse IV, <a href="/A191472/a191472_1.txt">Record values</a>
%e A191472 a(1) = 2*prime(3) - prime(2) - prime(1) = 2*5 - 3 - 2 = 5.
%t A191472 ps = Prime[Range[100]]; Table[2*ps[[n+2]] - ps[[n+1]] - ps[[n]], {n, Length[ps] - 2}] (* _T. D. Noe_, Aug 27 2012 *)
%t A191472 2#[[3]]-#[[2]]-#[[1]]&/@Partition[Prime[Range[70]],3,1] (* _Harvey P. Dale_, Aug 10 2023 *)
%t A191472 ListConvolve[{2, -1, -1}, Prime[Range[100]]] (* _Paolo Xausa_, Jul 30 2024 *)
%o A191472 (PARI) first(n)=my(v=vector(n),p=2,q=3,k); forprime(r=5,, if(k++>n, break); v[k]=2*r-q-p; p=q; q=r); v \\ _Charles R Greathouse IV_, Oct 03 2017
%Y A191472 Cf. A096379.
%K A191472 nonn
%O A191472 1,1
%A A191472 _Zak Seidov_, Aug 27 2012