login
A130816
a(1) = 2, a(2) = 2, a(3) = 1, a(n) = a(n-3) + floor(a(n-2)/2) for n >= 4.
1
2, 2, 1, 3, 2, 2, 4, 3, 4, 5, 5, 6, 7, 8, 9, 11, 12, 14, 17, 19, 22, 26, 30, 35, 41, 47, 55, 64, 74, 87, 101, 117, 137, 159, 185, 216, 251, 293, 341, 397, 463, 539, 628, 732, 853, 994, 1158, 1350, 1573, 1833, 2136, 2489, 2901, 3380, 3939, 4591, 5349, 6234, 7265, 8466
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
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
Sequence in context: A266697 A264402 A289186 * A109951 A116608 A002947
KEYWORD
nonn,easy
AUTHOR
Ivan Voras (ivoras(AT)gmail.com), Jul 16 2007
EXTENSIONS
Definition corrected by Georg Fischer, May 05 2021
STATUS
approved