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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048573 a(n) = a(n-1) + 2*a(n-2), a(0)=2, a(1)=3. 6
2, 3, 7, 13, 27, 53, 107, 213, 427, 853, 1707, 3413, 6827, 13653, 27307, 54613, 109227, 218453, 436907, 873813, 1747627, 3495253, 6990507, 13981013, 27962027, 55924053, 111848107, 223696213, 447392427, 894784853, 1789569707 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

Number of positive integers requiring exactly n signed bits in the modified non-adjacent form representation. - Ralf Stephan (ralf(AT)ark.in-berlin.de), Aug 02 2003

The n-th entry (n>1) of the sequence is equal to the 1,1-entry of the n-th power of the unnormalized 4 by 4 Haar matrix: [1 1 1 0 / 1 1 -1 0 / 1 1 0 1 / 1 1 0 -1]. - Simone Severini (simoseve(AT)gmail.com), Oct 27 2004

REFERENCES

Sam Northshield, "Stern's Diatomic Sequence 0,1,1,2,1,3,2,3,1,4,...", Amer. Math. Month., Vol. 117 (7), pp. 581-598, 2010.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

W. Bosma, Signed bits and fast exponentiation

FORMULA

G.f.: (2 + x) / (1 - x - 2*x^2). a(n) = (5*2^n + (-1)^n) / 3.

a(n) = 2^(n+1) - A001045(n). a(n) = A084170(n)+1 = abs(A083581(n)-3) = A081254(n+1) - A081254(n) = A084214(n+2)/2.

a(n)=2*A001045(n+1)+A001045(n) (note that 2 is the limit of A001045(n+1)/A001045(n)). [From Paul Barry (pbarry(AT)wit.ie), Sep 14 2009]

Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-3, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=-charpoly(A,-1). [From Milan R. Janjic (agnus(AT)blic.net), Jan 27 2010]

EXAMPLE

2 + 3*x + 7*x^2 + 13*x^3 + 27*x^4 + 53*x^5 + 107*x^6 + 213*x^7 + 427*x^8 + ...

MATHEMATICA

f1[n_]:=2*n+1; f2[n_]:=2*n-1; a=2; lst={a}; Do[AppendTo[lst, a=f2[a]]; AppendTo[lst, a=f1[a]], {n, 30}]; lst [From Vladimir Orlovsky, Feb 07 2010]

PROG

(PARI) {a(n) = if( n<0, 0, (5*2^n + (-1)^n) / 3)}

(PARI) {a(n) = if (n<0 , 0, if( n<2, n+2, a(n-1) + 2*a(n-2)))}

(MAGMA) [(5*2^n+(-1)^n)/3: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011

CROSSREFS

Cf. A001045, A081254, A083581, A084170, A084214.

Sequence in context: A128695 A024504 A088172 * A006946 A074129 A055003

Adjacent sequences:  A048570 A048571 A048572 * A048574 A048575 A048576

KEYWORD

nonn,easy

AUTHOR

Michael Somos, Jun 17 1999

EXTENSIONS

Formula of Milan Janjic moved here from wrong sequence by Paul D. Hanna (pauldhanna(AT)juno.com), May 29 2010

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

Content is available under The OEIS End-User License Agreement .

Last modified February 16 04:47 EST 2012. Contains 205860 sequences.