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!)
A064550 a(1) = 2, a(n)=a(n-1)+2*Q(n)-n, n > 1 where Q = A005185. 3
1, 2, 4, 7, 9, 12, 16, 19, 23, 26, 28, 33, 37, 40, 46, 49, 53, 58, 62, 67, 71, 74, 76, 85, 89, 92, 98, 103, 107, 110, 120, 123, 125, 132, 140, 143, 147, 154, 158, 163, 169, 174, 180, 185, 189, 192, 194, 211, 211, 212, 222, 227, 227, 234, 240, 241 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
MAPLE
A064550 := proc(n) option remember; if n=0 then 1 else A064550(n-1)+2*A005185(n-1)(n) - n; fi; end;
MATHEMATICA
q[0] = q[1] = 1;
q[n_] := q[n - q[n - 1]] + q[n - q[n - 2]];
a[1] = 2;
a[n_] := a[n] = a[n - 1] + 2*(q[n] - n/2);
Table[ a[n], {n, 1, 70} ]
PROG
(ARIBAS): function a064550(maxarg: integer); var n, r, rm, q: integer; qar: array; begin qar := alloc(array, maxarg + 1); qar[0] := 1; for n := 1 to maxarg do if n < 2 then q := 1; else q := qar[n - qar[n - 1]] + qar[n - qar[n - 2]]; end; qar[n] := q; if n = 1 then r := 2; else r := rm + round(2*(q - n/2)); end; rm := r; write(r, " "); end; end; a064550(65).
(Haskell)
a064550 n = a064550_list !! n
a064550_list = 1 : 2 : zipWith3 (\a q n -> a + 2 * q - n)
(tail a064550_list) (drop 2 a005185_list) [2..]
-- Reinhard Zumkeller, May 13 2012
CROSSREFS
Sequence in context: A065560 A134886 A024193 * A186357 A212988 A344290
KEYWORD
nonn,nice,easy
AUTHOR
Roger L. Bagula, Oct 08 2001
EXTENSIONS
More terms from Vladeta Jovovic, Klaus Brockhaus and Matthew Conroy, Oct 09 2001
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)