A094958 Numbers of the form 2^k or 5*2^k.
1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 2048, 2560, 4096, 5120, 8192, 10240, 16384, 20480, 32768, 40960, 65536, 81920, 131072, 163840, 262144, 327680, 524288, 655360, 1048576, 1310720, 2097152
Offset: 1
References
- Wacław Sierpiński, Pythagorean triangles, Dover Publications, Inc., Mineola, NY, 2003, p. 101, MR2002669.
Links
- Gregory Constantine, Multicolored isomorphic spanning trees in complete graphs, Discrete Mathematics and Theoretical Computer Science, Vol. 5 (2002), pp. 121-126.
- Index entries for linear recurrences with constant coefficients, signature (0,2).
Programs
-
Mathematica
With[{c=2^Range[0,30]},Union[Join[c,5c]]] (* Harvey P. Dale, Jul 15 2012 *)
-
Python
def A094958(n): return 1<
>1)+1 if n&1 else 5<<((n>>1)-2) # Chai Wah Wu, Feb 14 2025
Formula
a(1)=1, a(2)=2, a(3)=4, for n>=0, a(2n+3) = 4*2^n, a(2n+4) = 5*2^n.
Recurrence: for n>4, a(n) = 2a(n-2).
G.f.: x*(1+x)*(1+x+x^2)/(1-2x^2).
Sum_{n>=1} 1/a(n) = 12/5. - Amiram Eldar, Jan 21 2022
Extensions
Edited by T. D. Noe and M. F. Hasler, Nov 12 2010
Comments