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!)
A132174 Index of starting position of n-th generation of terms in A063882. 2

%I #15 Mar 09 2024 11:54:02

%S 1,5,10,21,44,92,189,385,778,1565,3141,6294,12602,25219,50454,100926,

%T 201871,403763,807548,1615119,3230263,6460552,12921132,25842293,

%U 51684616,103369264,206738561,413477157,826954350,1653908737,3307817513,6615635066,13231270174

%N Index of starting position of n-th generation of terms in A063882.

%H Chai Wah Wu, <a href="/A132174/b132174.txt">Table of n, a(n) for n = 1..1002</a>

%H B. Balamohan, A. Kuznetsov and S. Tanny, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL10/Tanny/tanny3.html">On the behavior of a variant of Hofstadter's Q-sequence</a>, J. Integer Sequences, Vol. 10 (2007), #07.7.1.

%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3, -2, 0, 0, 1, -3, 2).

%F From _Chai Wah Wu_, May 17 2017: (Start)

%F a(n) = 3*a(n-1) - 2*a(n-2) + a(n-5) - 3*a(n-6) + 2*a(n-7) for n > 8.

%F 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)

%o (Python)

%o from __future__ import division

%o def A132174(n):

%o if n == 1:

%o return 1

%o if n == 2:

%o return 5

%o h, m = divmod(n - 3, 5)

%o 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

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Nov 07 2007

%E More terms from _Chai Wah Wu_, May 17 2017

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 13:04 EDT 2024. Contains 371913 sequences. (Running on oeis4.)