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.

A258326 a(1) = 3; for n > 1, a(n) = a(n-1) + prime(n+2) - 2*prime(n+1) + 2*prime(n) - prime(n-1).

This page as a plain text file.
%I A258326 #19 Mar 25 2019 17:45:06
%S A258326 3,4,8,8,14,14,20,24,24,34,34,38,44,48,52,54,64,64,68,76,76,84,90,92,
%T A258326 98,104,104,110,122,116,132,132,146,140,154,156,160,168,172,174,188,
%U A258326 182,194,194,208,210,214,224,230,234,234,248,246,256,262,264,274,274
%N A258326 a(1) = 3; for n > 1, a(n) = a(n-1) + prime(n+2) - 2*prime(n+1) + 2*prime(n) - prime(n-1).
%C A258326 Conjecture: except for a(3)=8 and a(8)=24, this is the same as A073271.
%F A258326 For n>1, a(n) = a(n-1) - A062234(n+1) + A062234(n). - _Michel Marcus_, May 31 2015
%t A258326 f[n_] := Block[{a = {3}}, g[x_] := a[[x - 1]] + Prime[x + 2] - 2 Prime[x + 1] + 2 Prime@ x - Prime[x - 1]; Do[AppendTo[a, g@ k], {k, 2, n}]; a]; f@ 60 (* _Michael De Vlieger_, Jun 02 2015 *)
%t A258326 RecurrenceTable[{a[1]==3,a[n]==a[n-1]+Prime[n+2]-2Prime[n+1]+2Prime[n]-Prime[n-1]},a,{n,60}] (* _Harvey P. Dale_, Mar 25 2019 *)
%o A258326 (PARI) v=[3];n=2;while(n<50,v=concat(v,v[#v]+prime(n+2) - 2*prime(n+1)+2*prime(n)-prime(n-1));n++);v \\ _Derek Orr_, May 30 2015
%K A258326 nonn,easy
%O A258326 1,1
%A A258326 _Gionata Neri_, May 26 2015