A131577 Zero followed by powers of 2 (cf. A000079).
0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0
References
- Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Adi Dani, Compositions of natural numbers over arithmetic progressions
- Jimmy Devillet, Bisymmetric and quasitrivial operations: characterizations and enumerations, arXiv:1712.07856 [math.RA], 2017.
- J. T. Rowell, Solution Sequences for the Keyboard Problem and its Generalizations, Journal of Integer Sequences, 18 (2015), #15.10.7.
- Wikipedia, Lucas sequence
- Index entries for linear recurrences with constant coefficients, signature (2).
- Index entries for Lucas sequences
Programs
-
C
int is (unsigned long n) { return !(n & (n-1)); } /* Charles R Greathouse IV, Sep 15 2012 */
-
Haskell
a131577 = (`div` 2) . a000079 a131577_list = 0 : a000079_list -- Reinhard Zumkeller, Dec 09 2012
-
Magma
[(2^n-0^n)/2: n in [0..50]]; // Vincenzo Librandi, Aug 10 2011
-
Maple
A131577 := proc(n) if n =0 then 0; else 2^(n-1) ; end if; end proc: # R. J. Mathar, Jul 22 2012
-
Mathematica
Floor[2^Range[-1, 33]] (* Robert G. Wilson v, Sep 02 2007 *) Join[{0}, 2^Range[0, 60]] (* Vladimir Joseph Stephan Orlovsky, Jun 09 2011 *)
-
PARI
a(n)=1<
Charles R Greathouse IV, Sep 15 2012 -
Python
def A131577(n): return 1<
Chai Wah Wu, Sep 09 2023
Formula
a(n) = floor(2^(n-1)). - Robert G. Wilson v, Sep 02 2007
G.f.: x/(1-2*x); a(n) = (2^n-0^n)/2. - Paul Barry, Jan 05 2009
E.g.f.: exp(x)*sinh(x). - Geoffrey Critzer, Oct 28 2012
E.g.f.: x/T(0) where T(k) = 4*k+1 - x/(1 + x/(4*k+3 - x/(1 + x/T(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Mar 17 2013
a(n) = Sum_{k=0..floor((n+1)/2)} binomial(n, 2*k-1). - Taras Goy, Jan 02 2025
Extensions
More terms from Robert G. Wilson v, Sep 02 2007
Edited by N. J. A. Sloane, Sep 13 2007
Edited by M. F. Hasler, Jan 13 2015
Comments