login
2^A003056: 2^n appears n+1 times.
12

%I #37 Feb 10 2023 14:39:18

%S 1,2,2,4,4,4,8,8,8,8,16,16,16,16,16,32,32,32,32,32,32,64,64,64,64,64,

%T 64,64,128,128,128,128,128,128,128,128,256,256,256,256,256,256,256,

%U 256,256,512,512,512,512,512,512,512,512,512,512,1024,1024,1024,1024,1024,1024

%N 2^A003056: 2^n appears n+1 times.

%C First differences of A007664.

%C Viewed as a triangle, it is computed like Pascal's triangle, but with 2^n on the triangle edges. - _T. D. Noe_, Jul 31 2013

%C From _Paul Curtz_, Oct 23 2018: (Start)

%C Oresme numbers O(n) = n/2^n are an autosequence of the first kind. The corresponding sequence of the second kind is 1/2^n. The difference table is

%C 1 1/2 1/4 1/8 ...

%C -1/2 -1/4 -1/8 -1/16 ...

%C 1/4 1/8 1/16 1/32 ...

%C -1/8 -1/16 -1/32 -1/64 ...

%C etc.

%C The denominators on the antidiagonals are a(n). (End)

%H Vincenzo Librandi, <a href="/A137688/b137688.txt">Rows n = 0..100, flattened</a>

%F a(n) = 2^[sqrt(2n+2)-.5] = 2^A003056(n) = A007664(n+1) - A007664(n).

%F Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - _Boris Putievskiy_, Aug 19 2013

%F Viewed as a triangle T(n,k) : T(n,k)=2*T(n-1,k)+2*T(n-1,k-1)-4*T(n-2,k-1), T(0,0)=1, T(n,k)=0 if k<0 or if k>n. - _Philippe Deléham_, Dec 26 2013

%F Sum_{n>=0} 1/a(n) = 4. - _Amiram Eldar_, Aug 16 2022

%e Triangle T(n,k) begins:

%e 1

%e 2, 2

%e 4, 4, 4

%e 8, 8, 8, 8

%e 16, 16, 16, 16, 16

%e 32, 32, 32, 32, 32, 32

%e 64, 64, 64, 64, 64, 64, 64

%e - _Philippe Deléham_, Dec 26 2013

%p seq(seq(2^n,k=1..n+1),n=0..10); # _Muniru A Asiru_, Oct 23 2018

%t t = {}; Do[r = {}; Do[If[k == 0||k == n, m = 2^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 9}]; t = Flatten[t] (* _Vincenzo Librandi_, Aug 01 2013 *)

%o (PARI) A137688(n)= 1<<floor(sqrt(2*n+2)-.5)

%o (Haskell)

%o a137688 n = a137688_list !! n

%o a137688_list = concat $ zipWith ($) (map replicate [1..]) (map (2^) [0..])

%o -- _Reinhard Zumkeller_, Mar 18 2011

%o (GAP) Flat(List([0..10],n->List([1..n+1],k->2^n))); # _Muniru A Asiru_, Oct 23 2018

%o (Python)

%o from math import isqrt

%o def A137688(n): return 1<<(isqrt((n<<3)+1)-1>>1) # _Chai Wah Wu_, Feb 10 2023

%Y Cf. A003056, A007664 (gives partial sums).

%K easy,nonn,tabl

%O 0,2

%A _M. F. Hasler_, Feb 06 2008