OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(1)=1, a(2n) = a(2n-1)+2n, a(2n+1)=a(2n)+3n. a(n) = A111711(n)+floor(n/2). - Franklin T. Adams-Watters, May 01 2006
EXAMPLE
a(4) = (8+9+10+13)/4 =10
MATHEMATICA
With[{r = Range[50]}, Accumulate[Join[{1}, Riffle[2*r, 3*r]]]] (* or *)
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 3, 6, 10, 16}, 100] (* Paolo Xausa, Feb 09 2024 *)
PROG
(Haskell)
a111712 n = a111712_list !! (n-1)
a111712_list = scanl (+) 1 a195013_list
-- Reinhard Zumkeller, Apr 06 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Aug 24 2005
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 01 2006
STATUS
approved