Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A033538
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A033538 a(0)=1, a(1)=1, a(n)=3*a(n-1)+a(n-2)+1. +0
3
1, 1, 5, 17, 57, 189, 625, 2065, 6821, 22529, 74409, 245757, 811681, 2680801, 8854085, 29243057, 96583257, 318992829, 1053561745, 3479678065, 11492595941, 37957465889, 125364993609, 414052446717, 1367522333761, 4516619448001 (list; graph; listen)
OFFSET

0,3

COMMENT

Number of times certain simple recursive programs (such as the Lisp program shown) call themselves on an input of length n.

REFERENCES

E. Hyvonen and J. Seppanen, LISP-kurssi, Osa 6 (Funktionaalinen ohjelmointi), Prosessori 4/1983, pp. 48-50 (in Finnish).

LINKS

T. D. Noe, Table of n, a(n) for n=0..200

A. Karttunen, More information

FORMULA

O.g.f.: (1-3x+3x^2)/((1-x)(1-3x-x^2)). a(n)=(4*A006190(n+1)-8*A006190(n)-1)/3. [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 22 2008]

a(n)=-1/3+2/39*(3/2-1/2*sqrt(13))^n*sqrt(13)-2/39*sqrt(13)*(3/2+1/2*sqrt(13))^n+2/3 *(3/2-1/2*sqrt(13))^n+2/3*(3/2+1/2*sqrt(13))^n, with n>=0 [From Paolo P. Lava (ppl(AT)spl.at), Sep 01 2008]

MAPLE

a := proc(n) option remember; if(n < 2) then RETURN(1); else RETURN(3*a(n-1)+a(n-2)+1); fi; end;

PROGRAM

(Lisp) (defun rewerse (lista) (cond ((null (cdr lista)) lista) (t (cons (car (rewerse (cdr lista))) (rewerse (cons (car lista) (rewerse (cdr (rewerse (cdr lista))))))))))

CROSSREFS

Cf. A033539.

Sequence in context: A145371 A112044 A027030 this_sequence A027093 A027032 A027095

Adjacent sequences: A033535 A033536 A033537 this_sequence A033539 A033540 A033541

KEYWORD

nonn,nice,easy

AUTHOR

Antti Karttunen

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 5 20:25 EST 2009. Contains 170428 sequences.


AT&T Labs Research