cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A137688 2^A003056: 2^n appears n+1 times.

Original entry on oeis.org

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, 64, 64, 128, 128, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024, 1024, 1024, 1024
Offset: 0

Views

Author

M. F. Hasler, Feb 06 2008

Keywords

Comments

First differences of A007664.
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
From Paul Curtz, Oct 23 2018: (Start)
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
1 1/2 1/4 1/8 ...
-1/2 -1/4 -1/8 -1/16 ...
1/4 1/8 1/16 1/32 ...
-1/8 -1/16 -1/32 -1/64 ...
etc.
The denominators on the antidiagonals are a(n). (End)

Examples

			Triangle T(n,k) begins:
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, 64, 64
- _Philippe Deléham_, Dec 26 2013
		

Crossrefs

Cf. A003056, A007664 (gives partial sums).

Programs

  • GAP
    Flat(List([0..10],n->List([1..n+1],k->2^n))); # Muniru A Asiru, Oct 23 2018
    
  • Haskell
    a137688 n = a137688_list !! n
    a137688_list = concat $ zipWith ($) (map replicate [1..]) (map (2^) [0..])
    -- Reinhard Zumkeller, Mar 18 2011
    
  • Maple
    seq(seq(2^n,k=1..n+1),n=0..10); # Muniru A Asiru, Oct 23 2018
  • Mathematica
    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 *)
  • PARI
    A137688(n)= 1<
    				
  • Python
    from math import isqrt
    def A137688(n): return 1<<(isqrt((n<<3)+1)-1>>1) # Chai Wah Wu, Feb 10 2023

Formula

a(n) = 2^[sqrt(2n+2)-.5] = 2^A003056(n) = A007664(n+1) - A007664(n).
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013
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
Sum_{n>=0} 1/a(n) = 4. - Amiram Eldar, Aug 16 2022