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 11-20 of 72 results. Next

A141725 a(n) = 4^(n+1) - 3.

Original entry on oeis.org

1, 13, 61, 253, 1021, 4093, 16381, 65533, 262141, 1048573, 4194301, 16777213, 67108861, 268435453, 1073741821, 4294967293, 17179869181, 68719476733, 274877906941, 1099511627773, 4398046511101, 17592186044413, 70368744177661
Offset: 0

Views

Author

Paul Curtz, Sep 13 2008

Keywords

Comments

Inverse binomial transform yields A003946 with A003946(1)=4 deleted. - R. J. Mathar, Sep 13 2008
Starting with n=1, binary numbers of the form 1X01 where X is an odd number of 1's. - Brad Clardy, Mar 22 2011
Column 4 of A193871. - Omar E. Pol, Aug 22 2011
The Sierpinski square curve is a representation of this sequence, where a(n) is the number squares filled by the Sierpinski (space-filling) square curve. The square footprint expands at a rate of (2^n-1)^2 (A000225)^2. The number of nodes per iteration grows at a rate of (4^n-1)/3 (A002450). See illustration in links. - John Elias, Jul 25 2022

Crossrefs

Programs

Formula

a(n) = 10*A001045(2*n) + A001045(2*n+1).
a(n) = 4*a(n-1) + 9 for n > 0, a(0) = 1.
a(n) = A036563(2*n+2).
G.f.: (1 + 8*x)/((1 - x)*(1 - 4*x)). - R. J. Mathar, Sep 13 2008
a(n) = 4^n - 3, with offset 1. - Omar E. Pol, Aug 22 2011
a(n) = 5*a(n-1) - 4*a(n-2) for n > 1, a(0) = 1, a(1) = 13. - Harvey P. Dale, Sep 25 2011
E.g.f.: exp(4*x) - 3*exp(x). - Elmo R. Oliveira, Nov 15 2023

Extensions

Edited by N. J. A. Sloane, Sep 13 2008
More terms from R. J. Mathar, Sep 13 2008

A329644 Möbius transform of A323244, the deficiency of A156552(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 4, -1, 3, 1, 5, 1, 14, 0, 0, 1, 9, 1, 12, -5, 16, 1, 8, -5, 44, 4, 5, 1, 2, 1, 24, 12, 80, -4, -4, 1, 254, -14, 0, 1, 22, 1, 47, 7, 224, 1, 24, -13, 19, 6, 83, 1, 12, -21, 44, -14, 746, 1, 14, 1, 1360, 20, -8, 8, 9, 1, 131, 252, 24, 1, 12, 1, 3836, 13, 149, -12, 71, 1, 56, -16, 5456, 1, -21, -74, 12248, -350, -40, 1
Offset: 1

Views

Author

Antti Karttunen, Nov 21 2019

Keywords

Comments

The first eleven zeros occur at n = 1, 15, 16, 40, 96, 119, 120, 160, 893, 2464, 6731. There are 3091 negative terms among the first 10000 terms.
Applying this function to the divisors of the first four terms of A324201 reveals the following pattern:
------------------------------------------------------------------------------------
A324201(n) divisors a(n) applied Sum of positive
to each: terms, A329610
9: [1, 3, 9] -> [0, 1, -1] 1
125: [1, 5, 25, 125] -> [0, 1, -5, 4] 5
161051: [1, 11, 121, 1331, 14641, 161051] -> [0, 1, -29, 4, -240, 264] 269
410338673: [1, 17, 289, 4913, 83521, 1419857, 24137569, 410338673]
-> [0, 1, -125, 4, -1008, 1032, -5048, 5144] 6181
The positive and negative terms seem to alternate, and the fourth term (from case n=125 onward) is always 4. See also array A329637.

Crossrefs

Programs

  • PARI
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    A323244(n) = if(1==n, 0, my(k=A156552(n)); (2*k)-sigma(k));
    A329644(n) = sumdiv(n,d,moebius(n/d)*A323244(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A323244(d).
a(n) = Sum_{d|n} A008683(n/d) * (2*A156552(d) - A323243(d)).
a(1) = 0; for n > 1, a(n) = 2*A297112(n) - A324543(n) = 2^A297113(n) - A324543(n).
a(n) = A329642(n) - A329643(n).
For all n >= 1, a(A000040(n)^2) = A323244(A000040(n)^2)-1 = -A036563(n).
For all primes p, a(p^3) = A323244(p^3) - A323244(p^2) = 4.

A263017 n is the a(n)-th positive integer having its binary weight.

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 1, 4, 4, 5, 2, 6, 3, 4, 1, 5, 7, 8, 5, 9, 6, 7, 2, 10, 8, 9, 3, 10, 4, 5, 1, 6, 11, 12, 11, 13, 12, 13, 6, 14, 14, 15, 7, 16, 8, 9, 2, 15, 17, 18, 10, 19, 11, 12, 3, 20, 13, 14, 4, 15, 5, 6, 1, 7, 16, 17, 21, 18, 22, 23, 16, 19, 24, 25, 17
Offset: 1

Views

Author

Paul Tek, Oct 07 2015

Keywords

Comments

Binary weight is given by A000120.
a(2^k) = k+1 for any k>=0.
a(2^k-1) = 1 for any k>0.
a(A057168(k)) = a(k)+1 for any k>0.
a(A036563(k+1)) = k for any k>0.
Ordinal transform of A000120. - Alois P. Heinz, Dec 23 2018

Examples

			The numbers with binary weight 3 are: 7, 11, 13, 14, 19, ...
Hence: a(7)=1, a(11)=2, a(13)=3, a(14)=4, a(19)=5, ...
And more generally: a(A014311(k))=k for any k>0.
		

Crossrefs

Programs

  • Haskell
    import Data.IntMap (empty, findWithDefault, insert)
    a263017 n = a263017_list !! (n-1)
    a263017_list = f 1 empty where
       f x m = y : f (x + 1) (insert h (y + 1) m) where
               y = findWithDefault 1 h m
               h = a000120 x
    -- Reinhard Zumkeller, Oct 09 2015
    
  • Maple
    a:= proc() option remember; local a, b, t; b, a:=
          proc() 0 end, proc(n) option remember; a(n-1);
            t:= add(i, i=convert(n, base, 2)); b(t):= b(t)+1
          end; a(0):=0; a
        end():
    seq(a(n), n=1..120);  # Alois P. Heinz, Dec 23 2018
  • Perl
    # See Links section.
    
  • Python
    from math import comb
    def A263017(n):
        c, k = 1, 0
        for i,j in enumerate(bin(n)[-1:1:-1]):
            if j == '1':
                k += 1
                c += comb(i,k)
        return c # Chai Wah Wu, Mar 01 2023

Formula

a(n) = 1 + A068076(n). - Antti Karttunen, May 22 2017

A081118 Triangle of first n numbers per row having exactly n 1's in binary representation.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 23, 27, 29, 31, 47, 55, 59, 61, 63, 95, 111, 119, 123, 125, 127, 191, 223, 239, 247, 251, 253, 255, 383, 447, 479, 495, 503, 507, 509, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2003

Keywords

Comments

T(n,n) = A036563(n+1) = 2^(n+1) - 3.
Numbers of the form 2^t - 2^k - 1, 1 <= k < t.

Examples

			Triangle begins:
.......... 1 ......... ................ 1
........ 3...5 ....... .............. 11 101
...... 7..11..13 ..... .......... 111 1011 1101
... 15..23..27..29 ... ...... 1111 10111 11011 11101
. 31..47..55..59..61 . . 11111 101111 110111 111011 111101.
		

Crossrefs

Programs

  • Haskell
    a081118 n k = a081118_tabl !! (n-1) !! (k-1)
    a081118_row n = a081118_tabl !! (n-1)
    a081118_tabl  = iterate
       (\row -> (map ((+ 1) . (* 2)) row) ++ [4 * (head row) + 1]) [1]
    a081118_list = concat a081118_tabl
    -- Reinhard Zumkeller, Feb 23 2012
  • Mathematica
    Table[2^(n+1)-2^(n-k+1)-1,{n,10},{k,n}]//Flatten (* Harvey P. Dale, Apr 09 2020 *)

Formula

T(n, k) = 2^(n+1) - 2^(n-k+1) - 1, 1<=k<=n.
a(n) = (2^A002260(n)-1)*2^A004736(n)-1; a(n)=(2^i-1)*2^j-1, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Apr 04 2013

A152187 a(n) = 3*a(n-1) + 5*a(n-2), with a(0)=1, a(1)=5.

Original entry on oeis.org

1, 5, 20, 85, 355, 1490, 6245, 26185, 109780, 460265, 1929695, 8090410, 33919705, 142211165, 596232020, 2499751885, 10480415755, 43940006690, 184222098845, 772366329985, 3238209484180, 13576460102465, 56920427728295
Offset: 0

Views

Author

Philippe Deléham, Nov 28 2008

Keywords

Comments

Unsigned version of A152185.
From Johannes W. Meijer, Aug 01 2010: (Start)
The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 and 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
The sequence above corresponds to 24 red king vectors, i.e., A[5] vectors, with decimal values 27, 30, 51, 54, 57, 60, 90, 114, 120, 147, 150, 153, 156, 177, 180, 210, 216, 240, 282, 306, 312, 402, 408 and 432. These vectors lead for the corner squares to A015523 and for the central square to A179606.
This sequence belongs to a family of sequences with g.f. (1+2*x)/(1 - 3*x - k*x^2). Red king sequences that are members of this family are A007483 (k=2), A108981 (k=4), A152187 (k=5; this sequence), A154964 (k=6), A179602 (k=7) and A179598 (k=8). We observe that there is no red king sequence for k=3. Other members of this family are A036563 (k=-2), A054486 (k=-1), A084244 (k=0), A108300 (k=1) and A000351 (k=10).
Inverse binomial transform of A015449 (without the first leading 1).
(End)

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,5},{1,5},40] (* Harvey P. Dale, May 03 2013 *)

Formula

G.f.: (1+2*x)/(1 - 3*x - 5*x^2).
Lim_{k->infinity} a(n+k)/a(k) = (A072263(n) + A015523(n)*sqrt(29))/2. - Johannes W. Meijer, Aug 01 2010
G.f.: G(0)*(1+2*x)/(2-3*x), where G(k) = 1 + 1/(1 - x*(29*k-9)/(x*(29*k+20) - 6/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 17 2013

A185346 a(n) = 2^n - 9.

Original entry on oeis.org

-8, -7, -5, -1, 7, 23, 55, 119, 247, 503, 1015, 2039, 4087, 8183, 16375, 32759, 65527, 131063, 262135, 524279, 1048567, 2097143, 4194295, 8388599, 16777207, 33554423, 67108855, 134217719, 268435447, 536870903, 1073741815, 2147483639, 4294967287, 8589934583
Offset: 0

Views

Author

Andreas Rieber, Dec 04 2012

Keywords

Crossrefs

Cf. A000225, A036563, A172252 (essentially the same).

Programs

Formula

G.f.: ( -8+17*x ) / ( (2*x-1)*(x-1) ). - R. J. Mathar, Dec 17 2012
E.g.f.: exp(2*x) - 9*exp(x). - G. C. Greubel, Jun 28 2017
From Elmo R. Oliveira, Nov 08 2023: (Start)
a(n) = 2*a(n-1) + 9 with a(0) = -8.
a(n) = 3*a(n-1) - 2*a(n-2) for n > 1. (End)

A272644 Triangle read by rows: T(n,m) = Sum_{i=0..m} Stirling2(m+1,i+1)*(-1)^(m-i)*i^(n-m)*i!, for n >= 2, m = 1..n-1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 13, 13, 1, 1, 29, 73, 29, 1, 1, 61, 301, 301, 61, 1, 1, 125, 1081, 2069, 1081, 125, 1, 1, 253, 3613, 11581, 11581, 3613, 253, 1, 1, 509, 11593, 57749, 95401, 57749, 11593, 509, 1, 1, 1021, 36301, 268381, 673261, 673261, 268381, 36301, 1021, 1
Offset: 2

Views

Author

N. J. A. Sloane, May 07 2016

Keywords

Comments

Gives number of bitriangular permutations. Could be prefixed with row 0 containing a single 1. - N. J. A. Sloane, Jan 10 2018

Examples

			Triangle begins:
n\m  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]
[2]  1;
[3]  1,      1;
[4]  1,      5,      1;
[5]  1,     13,     13,      1;
[6]  1,     29,     73,     29,      1;
[7]  1,     61,    301,    301,     61,      1;
[8]  1,    125,   1081,   2069,   1081,    125,      1;
[9]  1,    253,   3613,  11581,  11581,   3613,    253,      1;
...
		

Crossrefs

Column 2 is A036563.
Largest term in each row gives A272645.
Second diagonal from the right is 2^i - 3.
Third diagonal from the right edge is A006230.
T(2n,n) gives A048144.
For row sums see A297195.

Programs

  • Maple
    A272644 := proc(n,m)
        add(combinat[stirling2](m+1,i+1)*(-1)^(m-i)*i^(n-m)*i!,i=0..m) ;
    end proc:
    seq(seq(A272644(n,m),m=1..n-1),n=2..10) ; # R. J. Mathar, Mar 04 2018
  • Mathematica
    Table[Sum[StirlingS2[m + 1, i + 1] (-1)^(m - i) i^(n - m) i!, {i, 0, m} ], {n, 11}, {m, n - 1}] /. {} -> {0} // Flatten  (* Michael De Vlieger, May 19 2016 *)
  • PARI
    A(n,m) = sum(i=0, m, stirling(m+1, i+1, 2) * (-1)^((m-i)%2) * i^(n - m) * i!);
    concat(vector(10, n, vector(n, m, A(n+1, m))))  \\ Gheorghe Coserea, May 16 2016

Formula

T(n,m) = Sum_{i=0..m} Stirling2(m+1, i+1)*(-1)^(m-i)*i^(n-m)*i!, for n>=2, m=1..n-1, where Stirling2(n,k) is defined by A008277.
A001469(n+1) = Sum_{m=1..2*n-1} (-1)^(m-1)*T(2*n,m). - Gheorghe Coserea, May 18 2016

Extensions

More terms from Gheorghe Coserea, May 16 2016

A048483 Array read by antidiagonals: T(k,n) = (k+1)2^n - k.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 16, 15, 10, 5, 1, 32, 31, 22, 13, 6, 1, 64, 63, 46, 29, 16, 7, 1, 128, 127, 94, 61, 36, 19, 8, 1, 256, 255, 190, 125, 76, 43, 22, 9, 1, 512, 511, 382, 253, 156, 91, 50, 25, 10, 1, 1024, 1023, 766, 509, 316, 187
Offset: 0

Views

Author

Keywords

Comments

n-th difference of (T(k,n),T(k,n-1),...,T(k,0)) is k+1, for n=1,2,3,...; k=0,1,2,...

Examples

			1 2 4 8 16 32 ...
1 3 7 15 31 63 ...
1 4 10 22 46 94 ...
1 5 13 29 61 125 ...
1 6 16 36 76 156 ...
		

Crossrefs

Rows are A000079 (k=0), A000225 (k=1), A033484 (k=2), A036563 (k=3), A048487 (k=4), A048488 (k=5), A048489 (k=6), A048490 (k=7), A048491 (k=8).
Main diagonal is A048493. Cf. A048494.

Formula

G.f.: (1-x+kx)/[(1-x)(1-2x)]. E.g.f.: (k+1)*exp(2x) - k*exp(x).
Recurrences: T(k, n) = 2T(k, n-1)+k = T(k-1, n)+2^n-1, T(k, 0) = 1.

Extensions

Edited by Ralf Stephan, Feb 05 2004

A067576 Array T(i,j) read by downward antidiagonals, where T(i,j) is the j-th term whose binary expansion has i 1's.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 6, 11, 15, 16, 9, 13, 23, 31, 32, 10, 14, 27, 47, 63, 64, 12, 19, 29, 55, 95, 127, 128, 17, 21, 30, 59, 111, 191, 255, 256, 18, 22, 39, 61, 119, 223, 383, 511, 512, 20, 25, 43, 62, 123, 239, 447, 767, 1023, 1024, 24, 26, 45, 79, 125, 247, 479, 895, 1535, 2047
Offset: 1

Views

Author

Robert G. Wilson v, Jan 30 2002

Keywords

Comments

This is a permutation of the positive integers; the inverse permutation is A356419. - Jianing Song, Aug 06 2022

Examples

			Array begins:
        j=1  j=2  j=3  j=4  j=5  j=6
  i=1:    1,   2,   4,   8,  16,  32, ...
  i=2:    3,   5,   6,   9,  10,  12, ...
  i=3:    7,  11,  13,  14,  19,  21, ...
  i=4:   15,  23,  27,  29,  30,  39, ...
  i=5:   31,  47,  55,  59,  61,  62, ...
  i=6:   63,  95, 111, 119, 123, 125, ...
		

Crossrefs

T(n,n) gives A036563(n+1).
The antidiagonals are read in the opposite direction from those in A066884.
Antidiagonal sums give A361074.

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, Last[ Take[ Select[ Range[2^13], Count[ IntegerDigits[ #, 2], 1] == j & ], i - j]]], {i, 2, 12}, {j, 1, i - 1} ]; a

A123203 a(n) = 2^(n+1) - 3*n.

Original entry on oeis.org

1, 2, 7, 20, 49, 110, 235, 488, 997, 2018, 4063, 8156, 16345, 32726, 65491, 131024, 262093, 524234, 1048519, 2097092, 4194241, 8388542, 16777147, 33554360, 67108789, 134217650, 268435375, 536870828, 1073741737, 2147483558
Offset: 1

Views

Author

Gary W. Adamson, Jun 13 2007

Keywords

Comments

An elephant sequence, see A175654. For the corner squares just one A[5] vector, with decimal value 186, leads to this sequence. For the central square this vector leads to the companion sequence A036563. - Johannes W. Meijer, Aug 15 2010

Examples

			a(4) = 20, row sums of 4th row of triangle A131062: (1, 9, 9, 1).
a(4) = 20 = (1, 3, 3, 1) dot (1, 1, 4, 4) = (1 + 3 + 12 + 4).
		

Crossrefs

Programs

Formula

Binomial transform of [1, 1, 4, 4, 4, ...].
Equals row sums of triangle A131061.
From Johannes W. Meijer, Aug 15 2010; corrected by Colin Barker, Jul 28 2012: (Start)
a(n) = 2^(1+n) - 3*n.
a(n) = 3*A000295(n-1) + A000079(n-1).
(End)
G.f.: x*(1 - 2*x + 4*x^2)/((1-x)^2*(1-2*x)). - Colin Barker, Jul 28 2012
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Colin Barker, Jul 29 2012
E.g.f.: 2*exp(2*x) - 3*x*exp(x) - 2. - G. C. Greubel, Sep 14 2024

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Nov 15 2008
Title changed by G. C. Greubel, Sep 14 2024
Previous Showing 11-20 of 72 results. Next