login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244478 a(0)=2, a(1)=0, a(2)=2; thereafter a(n) = a(n-1-a(n-1))+a(n-2-a(n-2)) unless a(n-1) <= n-1 or a(n-2) <= n-2 in which case the sequence terminates. 3
2, 0, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 8, 8, 8, 10, 10, 10, 12, 12, 12, 12, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 20, 20, 20, 20, 22, 22, 22, 24, 24, 24, 24, 24, 26, 26, 26, 28, 28, 28, 28, 30, 30, 30, 32, 32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 36, 36, 36, 36, 38, 38, 38 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

REFERENCES

Higham, J.; Tanny, S. More well-behaved meta-Fibonacci sequences. Proceedings of the Twenty-fourth Southeastern International Conference on Combinatorics, Graph Theory, and Computing (Boca Raton, FL, 1993). Congr. Numer. 98(1993), 3-17. See Prop. 2.1.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Index entries for Hofstadter-type sequences

MAPLE

f := proc(n) option remember;

    if n=0 then 2

    elif n=1 then 0

    elif n=2 then 2

    else

    f(n-1-f(n-1))+f(n-2-f(n-2));

    fi;

end proc;

[seq(f(n), n=0..2000)];

PROG

(Haskell)

a244478 n = a244478_list !! n

a244478_list = 2 : 0 : 2 : zipWith (+) xs (tail xs)

   where xs = map a244478 $ zipWith (-) [1..] $ tail a244478_list

-- Reinhard Zumkeller, Jul 05 2014

CROSSREFS

A006949, A240807, A240808 use the same recurrence.

See also A244479 (a(n)/2).

Sequence in context: A161872 A278248 A036461 * A261153 A199123 A207944

Adjacent sequences:  A244475 A244476 A244477 * A244479 A244480 A244481

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Jul 02 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 27 22:57 EDT 2017. Contains 287210 sequences.