OFFSET
1,1
COMMENTS
Resulted from a search for a suitable slowly increasing, not easily predictable but not random integer sequence for testing hard drive storage patterns.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 2, a(2) = 2, a(3) = 1, a(4) = 2 + floor(2/2) = 3, a(5) = 2 + floor(1/2) = 2.
MAPLE
a:= proc(n) a(n):=`if`(n<4, [2$2, 1][n], iquo(a(n-2), 2)+a(n-3)) end:
seq(a(n), n=1..60); # Alois P. Heinz, May 05 2021
MATHEMATICA
RecurrenceTable[{a[n] == a[n-3] + Floor[a[n-2]/2], a[1] == 2, a[2] == 2, a[3] == 1}, a, {n, 1, 70}] (* Georg Fischer, May 05 2021 *)
PROG
(C) int f1 = 2; int f2 = 2; int f3 = 1; int next_seq() { int f = f1 + f2/2; f1 = f2; f2 = f3; f3 = f; return f; }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ivan Voras (ivoras(AT)gmail.com), Jul 16 2007
EXTENSIONS
Definition corrected by Georg Fischer, May 05 2021
STATUS
approved