login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 0
3, 4, 8, 8, 14, 14, 20, 24, 24, 34, 34, 38, 44, 48, 52, 54, 64, 64, 68, 76, 76, 84, 90, 92, 98, 104, 104, 110, 122, 116, 132, 132, 146, 140, 154, 156, 160, 168, 172, 174, 188, 182, 194, 194, 208, 210, 214, 224, 230, 234, 234, 248, 246, 256, 262, 264, 274, 274 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: except for a(3)=8 and a(8)=24, this is the same as A073271.
LINKS
FORMULA
For n>1, a(n) = a(n-1) - A062234(n+1) + A062234(n). - Michel Marcus, May 31 2015
MATHEMATICA
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 *)
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 *)
PROG
(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
CROSSREFS
Sequence in context: A065309 A097689 A349609 * A308769 A002246 A310016
KEYWORD
nonn,easy
AUTHOR
Gionata Neri, May 26 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)