A132174 Index of starting position of n-th generation of terms in A063882.
1, 5, 10, 21, 44, 92, 189, 385, 778, 1565, 3141, 6294, 12602, 25219, 50454, 100926, 201871, 403763, 807548, 1615119, 3230263, 6460552, 12921132, 25842293, 51684616, 103369264, 206738561, 413477157, 826954350, 1653908737, 3307817513, 6615635066, 13231270174
Offset: 1
Keywords
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..1002
- B. Balamohan, A. Kuznetsov and S. Tanny, On the behavior of a variant of Hofstadter's Q-sequence, J. Integer Sequences, Vol. 10 (2007), #07.7.1.
- Index entries for Hofstadter-type sequences
- Index entries for linear recurrences with constant coefficients, signature (3, -2, 0, 0, 1, -3, 2).
Programs
-
Python
from _future_ import division def A132174(n): if n == 1: return 1 if n == 2: return 5 h, m = divmod(n - 3, 5) return (382*2**(5*h + m)-10*2**m)//31- 7*h - m -(1 if m==3 else (-1 if m==4 else 2)) # Chai Wah Wu, May 17 2017
Formula
From Chai Wah Wu, May 17 2017: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-5) - 3*a(n-6) + 2*a(n-7) for n > 8.
G.f.: x*(-5*x^7 + x^6 - x^5 - x^4 - x^3 + 3*x^2 - 2*x - 1)/((x - 1)^2*(2*x - 1)*(x^4 + x^3 + x^2 + x + 1)). (End)
Extensions
More terms from Chai Wah Wu, May 17 2017