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.

Previous Showing 51-60 of 61 results. Next

A163978 a(n) = 2*a(n-2) for n > 2; a(1) = 3, a(2) = 4.

Original entry on oeis.org

3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072, 196608, 262144, 393216, 524288, 786432, 1048576, 1572864, 2097152, 3145728
Offset: 1

Views

Author

Klaus Brockhaus, Aug 07 2009

Keywords

Comments

Interleaving of A007283 and A000079 without initial terms 1 and 2.
Equals A029744 without first two terms. Agrees with A145751 for all terms listed there (up to 65536).
Binomial transform is A078057 without initial 1, second binomial transform is A048580, third binomial transform is A163606, fourth binomial transform is A163604, fifth binomial transform is A163605.
a(n) is the number of vertices of the (n-1)-iterated line digraph L^{n-1}(G) of the digraph G(=L^0(G)) with vertices u,v,w and arcs u->v, v->u, v->w, w->v. - Miquel A. Fiol, Jun 08 2024

Crossrefs

Programs

  • Magma
    [ n le 2 select n+2 else 2*Self(n-2): n in [1..41] ];
    
  • Mathematica
    LinearRecurrence[{0,2}, {3,4}, 52] (* or *) Table[(1/2)*(5-(-1)^n )*2^((2*n-1+(-1)^n)/4), {n,50}] (* G. C. Greubel, Aug 24 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec(x*(3+4*x)/(1-2*x^2)) \\ G. C. Greubel, Aug 24 2017
    
  • SageMath
    [(2+(n%2))*2^((n-(n%2))//2) for n in range(1,41)] # G. C. Greubel, Jun 13 2024

Formula

a(n) = A027383(n-1) + 2.
a(n) = A052955(n) + 1 for n >= 1.
a(n) = (1/2)*(5 - (-1)^n)*2^((2*n - 1 + (-1)^n)/4).
G.f.: x*(3+4*x)/(1-2*x^2).
a(n) = A090989(n-1).
E.g.f.: (1/2)*(4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x) - 4). - G. C. Greubel, Aug 24 2017
a(n) = A063759(n), n >= 1. - R. J. Mathar, Jan 25 2023

A332954 Triangle read by rows: T(n,k) is the number of permutations sigma of [n] such that sigma(j)/(j+k) > sigma(j+1)/(j+k+1) for 1 <= j <= n-1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 6, 3, 2, 1, 1, 1, 9, 5, 3, 2, 1, 1, 1, 19, 8, 5, 3, 2, 1, 1, 1, 30, 13, 7, 5, 3, 2, 1, 1, 1, 60, 21, 12, 7, 5, 3, 2, 1, 1, 1, 108, 38, 17, 11, 7, 5, 3, 2, 1, 1, 1
Offset: 0

Views

Author

Seiichi Manyama, Mar 04 2020

Keywords

Comments

Conjecture: T(2*n+4,n) = A052955(n+2). This is true for n <= 10.
T(n+1,k) is equal to the number of permutations sigma of [n] such that sigma(j)/(j+k) >= sigma(j+1)/(j+k+1) for 1 <= j <= n-1.

Examples

			Triangle begins:
n\k  |   0   1   2   3   4  5  6  7  8  9 10 11
-----+-----------------------------------------
   0 |   1;
   1 |   1,  1;
   2 |   1,  1,  1;
   3 |   2,  1,  1,  1;
   4 |   3,  2,  1,  1,  1;
   5 |   6,  3,  2,  1,  1, 1;
   6 |   9,  5,  3,  2,  1, 1, 1;
   7 |  19,  8,  5,  3,  2, 1, 1, 1;
   8 |  30, 13,  7,  5,  3, 2, 1, 1, 1;
   9 |  60, 21, 12,  7,  5, 3, 2, 1, 1, 1;
  10 | 108, 38, 17, 11,  7, 5, 3, 2, 1, 1, 1;
  11 | 222, 64, 31, 16, 11, 7, 5, 3, 2, 1, 1, 1;
		

Crossrefs

T(n,0) gives A309807.
Cf. A052955.

A206918 Sum of binary palindromes p < 2^n.

Original entry on oeis.org

0, 1, 4, 16, 40, 136, 328, 1096, 2632, 8776, 21064, 70216, 168520, 561736, 1348168, 4493896, 10785352, 35951176, 86282824, 287609416, 690262600, 2300875336, 5522100808, 18407002696, 44176806472, 147256021576, 353414451784, 1178048172616, 2827315614280
Offset: 0

Views

Author

Hieronymus Fischer, Feb 18 2012

Keywords

Comments

Partial sums of A206917.
Partial sums of A052955(n) terms of A006995; for example: A052955(4)=7, the sum of the first 7 terms of A006995 is 0+1+3+5+7+15+17=40 which equals a(4).

Examples

			a(0) = 0, since p=0 is the only binary palindrome p<2^0;
a(3) = 16, since p=0, 1, 3, 5, 7 are the only binary palindromes < 2^3 and 0+1+3+5+7=16.
		

Crossrefs

See A016116 for the number of binary palindromes between 2^(n-1) and 2^n.
See A052995 for the number of binary palindromes < 2^n.
See A206917 for the sum of binary palindromes between 2^(n-1) and 2^n.

Formula

a(n) = sum(k=0..n, A206917(k)).
a(n) = sum(k=1..A052955(n), A006995(k)).
a(n) = sum(k=1..(1/2)*(5-(-1)^n)*2^floor(n/2)-1, A006995(k)).
a(n) = (8/7)*((3/4)*((4-(-1)^n)/(3+(-1)^n))*2^(3*floor(n/2))-1).
G.f.: x*(1+3*x+4*x^2)/((x-1)*(8*x^2-1)). - Alois P. Heinz, Feb 28 2012

A208245 Triangle read by rows: a(n,k) = a(n-2,k) + a(n-2,k-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 3, 2, 1, 1, 1, 4, 6, 5, 3, 2, 1, 1, 1, 4, 7, 7, 5, 3, 2, 1, 1, 1, 5, 10, 11, 8, 5, 3, 2, 1, 1, 1, 5, 11, 14, 12, 8, 5, 3, 2, 1, 1, 1, 6, 15, 21, 19, 13, 8, 5, 3, 2, 1, 1, 1, 6, 16, 25, 26, 20, 13, 8, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Richard R. Forberg, Apr 22 2013

Keywords

Comments

Sum of terms in each row are given by sequence A052955.
Columns (at constant k) converge toward Fibonacci starting first from high value of k).
First seven rows are same as A008242. The odd numbered rows of this sequence equal the rows of A123736. Also it has some similarities to A162741.
Columns (constant k), prior to convergence to Fibonacci, appear as various other sequences (e.g. k = 4, is sequence A055803, with other columns in same referenced family).

Examples

			The first 13 rows are (as above) where n is the row index:
1
1, 1
1, 1, 1
1, 2, 1, 1
1, 2, 2, 1, 1
1, 3, 3, 2, 1, 1
1, 3, 4, 3, 2, 1, 1
1, 4, 6, 5, 3, 2, 1, 1
1, 4, 7, 7, 5, 3, 2, 1, 1
1, 5, 10, 11, 8, 5, 3, 2, 1, 1
1, 5, 11, 14, 12, 8, 5, 3, 2, 1, 1
1, 6, 15, 21, 19, 13, 8, 5, 3, 2, 1, 1
1, 6, 16, 25, 26, 20, 13, 8, 5, 3, 2, 1, 1,
		

Crossrefs

Cf. A000045 (central terms).

Programs

  • Haskell
    a208245 n k = a208245_tabl !! (n-1) !! (k-1)
    a208245_row n = a208245_tabl !! (n-1)
    a208245_tabl = map fst $ iterate f ([1], [1, 1]) where
       f (us, vs) = (vs, zipWith (+) ([0] ++ us ++ [0]) (us ++ [0, 1]))
    -- Reinhard Zumkeller, Jul 28 2013

Formula

a(n,k) = a(n-2,k) + a(n-2,k-1); if n=k or k=1 then a(n,k)=1; if n

A191795 Triangle read by rows: T(n,k) is the number of length n left factors of Dyck paths having k DUU's, where U=(1,1) and D=(1,-1).

Original entry on oeis.org

1, 1, 2, 3, 5, 1, 7, 3, 11, 9, 15, 19, 1, 23, 42, 5, 31, 77, 18, 47, 150, 54, 1, 63, 255, 137, 7, 95, 464, 333, 32, 127, 753, 720, 115, 1, 191, 1314, 1558, 360, 9, 255, 2067, 3067, 996, 50, 383, 3508, 6167, 2597, 214, 1, 511, 5397, 11410, 6207, 774, 11, 767, 8982, 21820, 14485, 2494, 72
Offset: 0

Author

Emeric Deutsch, Jun 18 2011

Keywords

Comments

Row n >= 1 contains ceiling(n/3) entries.
Sum of entries in row n is binomial(n, floor(n/2)) = A001405(n).
T(n,0) = A052955(n-1).
Sum_{k>=0} k*T(n,k) = A191796(n).

Examples

			T(5,1)=3 because we have U(DUU)D, U(DUU)U, and UU(DUU), where U=(1,1) and D=(1,-1) (the DUU's are shown between parentheses).
Triangle starts:
   1;
   1;
   2;
   3;
   5,  1;
   7,  3;
  11,  9;
  15, 19, 1;
  23, 42, 5;
		

Crossrefs

Programs

  • Maple
    eq := t*z^2*C^2-(1-2*z^2+2*t*z^2)*C+1-z^2+t*z^2 = 0: C := RootOf(eq, C): G := 1-(1-C-z*C)/(1-z+t*z-t*z*C): Gser := simplify(series(G, z = 0, 23)): for n from 0 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: 1; for n to 18 do seq(coeff(P[n], t, k), k = 0 .. ceil((1/3)*n)-1) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = 1 - (1-C-z*C)/(1-z+t*z-t*z*C), where C=C(t,z) is given by t*z^2*C^2 - (1-2*z^2+2*t*z^2)*C + 1-z^2+t*z^2 = 0.

A249452 Numbers k such that A249441(k) = 3.

Original entry on oeis.org

15, 31, 47, 63, 95, 127, 191, 255, 383, 511, 767, 1023, 1535, 2047, 3071, 4095, 6143, 8191, 12287, 16383, 24575, 32767, 49151, 65535, 98303, 131071, 196607, 262143, 393215, 524287, 786431, 1048575, 1572863, 2097151, 3145727, 4194303, 6291455, 8388607, 12582911
Offset: 1

Author

Vladimir Shevelev, Oct 29 2014

Keywords

Comments

Or k for which none of entries in the k-th row of Pascal's triangle (A007318) is divisible by 4 (cf. comment in A249441).
Using the Kummer carries theorem, one can prove that, for n>=2, a(n) has the form of either 1...1 or 101...1 in base 2.
The sequence is a subset of so-called binomial coefficient predictors (BCP) in base 2 (see Shevelev link, Th. 6 and Cor. 8), which were found also using Kummer theorem and have a very close binary structure.

Programs

  • Mathematica
    CoefficientList[Series[(15 + 16 x - 14 x^2 - 16 x^3)/(1 - x -2 x^2 + 2 x^3), {x, 0, 70}], x] (* Vincenzo Librandi, Oct 30 2014 *)
    LinearRecurrence[{1,2,-2},{15,31,47,63},40] (* Harvey P. Dale, Apr 01 2019 *)
  • PARI
    a(n)=if(n==1, 15, (n%2+2)<<(n\2+3)-1) \\ Charles R Greathouse IV, Nov 06 2014
    
  • PARI
    is(n)=(n+1)>>valuation(n+1, 2)<5 && !setsearch([1, 2, 3, 5, 7, 11, 23], n) \\ Charles R Greathouse IV, Nov 06 2014

Formula

a(n) has either form 2^k - 1 or 3*2^m-1, k, m >= 4 (cf. A000225, A055010). Since, for k>=5, 2^k-1<3*2^(k-1)-1<2^(k+1)-1, we have that, for n>=1, a(2*n) = 2^(n+4)-1; a(2*n+1) = 3*2^(n+3)-1. - Vladimir Shevelev, Oct 29 2014, Nov 06 2014
a(1) = 15, and for n>1, a(n) = A052955(n+6). [Follows from above] - Antti Karttunen, Nov 03 2014
G.f.: (15+16*x-14*x^2-16*x^3)/(1-x-2*x^2+2*x^3); a(n) = 16*A029744(n)-1. - Peter J. C. Moses, Oct 30 2014

Extensions

More terms from Peter J. C. Moses, Oct 29 2014

A364144 Number of distinct representations for n in base 2, using digits -1,0,1, whose sum of digits is 0.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 3, 1, 3, 2, 4, 2, 4, 3, 4, 1, 3, 3, 5, 2, 6, 4, 6, 2, 5, 4, 7, 3, 6, 4, 5, 1, 3, 3, 6, 3, 7, 5, 8, 2, 7, 6, 10, 4, 10, 6, 8, 2, 6, 5, 9, 4, 10, 7, 10, 3, 8, 6, 10, 4, 8, 5, 6, 1, 3, 3, 6, 3, 8, 6, 9, 3, 8, 7, 13, 5, 12, 8, 11, 2, 8, 7, 13, 6
Offset: 0

Author

Jeffrey Shallit, Jul 10 2023

Keywords

Examples

			a(12) = 2, because 12 = 16-4 = 32-16-8+4.
		

Crossrefs

Programs

  • PARI
    a364144(upto) = {my (a=vector(upto)); for (k=1, 3^floor(3*log(upto)), my (w=digits(k,3), n); w=apply(x->x-1, w); if (w[1] && vecsum(w)==0, my (n=fromdigits(w,b=2)); if (n>0 && n<=#a, a[n]++))); concat(1,a)};
    a364144(70) \\ Hugo Pfoertner, Jul 11 2023

Formula

a(2^n) = 1.
a(2^n-1) = A028310(n).

Extensions

a(0)=1 prepended by Alois P. Heinz, Jul 10 2023

A385396 Numbers k such that 8 does not divide binomial(k, j) for any j in 0..k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15, 19, 23, 27, 31, 39, 47, 55, 63, 79, 95, 111, 127, 159, 191, 223, 255, 319, 383, 447, 511, 639, 767, 895, 1023, 1279, 1535, 1791, 2047, 2559, 3071, 3583, 4095, 5119, 6143, 7167, 8191, 10239, 12287, 14335, 16383, 20479, 24575
Offset: 1

Author

Peter Luschny, Jun 28 2025

Keywords

Crossrefs

Cf. A000225 (case m=2), A052955 (case m=4).

Programs

  • Maple
    isa := n -> andmap(j -> modp(binomial(n, j), 8) > 0, [seq(0..n)]): select(isa, [seq(0..200)]);
    # Or, using the o.g.f.:
    gf := (x + x^2 + x^3 + x^4 - x^5 - x^6 - x^7)/((-1 + x)*(-1 + 2*x^4)): ser := series(gf, x, 60): seq(coeff(ser, x, n), n = 0..53);
  • Mathematica
    LinearRecurrence[{1, 0, 0, 2, -2}, Range[0, 7], 60] (* Paolo Xausa, Jun 30 2025 *)
  • Python
    def seq_gen():
        n, c, value = 0, 1, 3
        for v in [0, 1, 2]: yield v
        while True:
            yield value
            value += c
            n += 1
            if n == 4:
                n = 0
                c += c
    term = seq_gen()
    print([next(term) for _ in range(54)])

Formula

a(n) = [x^n] (x + x^2 + x^3 + x^4 - x^5 - x^6 - x^7)/((-1 + x)*(-1 + 2*x^4)).
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) for n > 8. - Chai Wah Wu, Jun 28 2025

A065548 a(1) = 1 and, for n > 0, a(2*n) = sum{a(i) | 0 < i <= n}, a(2*n+1) = a(n)^2.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 5, 4, 6, 1, 9, 9, 10, 1, 15, 25, 19, 16, 25, 36, 26, 1, 35, 81, 44, 81, 54, 100, 55, 1, 70, 225, 95, 625, 114, 361, 130, 256, 155, 625, 191, 1296, 217, 676, 218, 1, 253, 1225, 334, 6561, 378, 1936, 459, 6561, 513, 2916, 613, 10000, 668, 3025, 669, 1
Offset: 1

Author

Reinhard Zumkeller, Nov 28 2001

Keywords

Crossrefs

a(A052955(k)) = 1 for all k.

A216344 Triangle T(n,k), read by rows, given by (0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, -1, 1, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938 .

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 4, 4, 3, 1, 0, 8, 8, 7, 4, 1, 0, 16, 16, 16, 11, 5, 1, 0, 32, 32, 36, 28, 16, 6, 1, 0, 64, 64, 80, 68, 45, 22, 7, 1, 0, 128, 128, 176, 160, 118, 68, 29, 8, 1, 0, 256, 256, 384
Offset: 0

Author

Philippe Deléham, Sep 04 2012

Keywords

Examples

			Triangle begins :
1
0, 1
0, 1, 1
0, 2, 2, 1
0, 4, 4, 3, 1
0, 8, 8, 7, 4, 1
0, 16, 16, 16, 11, 5, 1
0, 32, 32, 36, 28, 16, 6, 1
		

Crossrefs

Formula

G.f.: (1-2*x+y*x^2)/(1-2*x-y*x+2*y*x^2-y^2*x^3)
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - 2*T(n-2,k-1) + T(n-3,k-2), T(0,0) = T(1,1) = T(2,1) = T(2,2) = 1, T(1,0) = T(2,0) = 0 and T(n,k) = 0 if k<0 or if k>n .
Sum_{k, 0<=k<=n} T(n,k) = A034943(n+1) .
Sum_{k, 0<=k<=n} T(n,k)*2^k*(-1/2)^(n-k) = A052955(n) .
T(n+1,1) = A011782(n), T(n+2,2) = 2^n = A000079(n), T(n+3,3) = A045891(n+1) .
Previous Showing 51-60 of 61 results. Next