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!)
A096824 a(n) = n for n <= 2; for n > 2, a(n) = 2a(n-1) - a(n - floor(1/2 + sqrt(2(n-1)))). 3
0, 1, 2, 3, 4, 6, 9, 14, 24, 42, 75, 136, 258, 492, 942, 1809, 3482, 6828, 13398, 26304, 51666, 101523, 199564, 395646, 784464, 1555530, 3084756, 6117846, 12134169, 24068774, 47937984, 95480322, 190176180, 378796830, 754508904, 1502899962 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
a[n_] := a[n] = If[n < 3, a[n] = n, 2a[n - 1] - a[n - Floor[1/2 + Sqrt[2(n - 1)]]]]; Table[ a[n], {n, 0, 35}] (* Robert G. Wilson v, Aug 20 2004 *)
PROG
(PARI) {m=36; v=vector(m+1); for(n=0, m, if(n<=2, a=n, k=n-floor(1/2+sqrt(2*(n-1))); a=2*v[n]-v[k+1]); v[n+1]=a; print1(a, ", "))} \\ Klaus Brockhaus, Aug 20 2004
(Haskell)
a096824 n = a096824_list !! n
a096824_list = 0 : 1 : 2 : zipWith (-)
(map (* 2) $ drop 2 a096824_list) (map a096824 $ tail a122797_list)
-- Reinhard Zumkeller, Feb 12 2012
CROSSREFS
Sequence in context: A001115 A173278 A173289 * A192488 A089797 A081237
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 17 2004
EXTENSIONS
More terms from Klaus Brockhaus and Robert G. Wilson v, Aug 20 2004
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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)