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 69 results. Next

A348925 Number of 4-sided prudent polygons of area n.

Original entry on oeis.org

8, 16, 40, 96, 232, 560, 1336, 3176, 7480, 17528, 40776, 94336, 216976, 496432, 1130120, 2560648, 5776304, 12976112, 29036008, 64732992, 143814192, 318455632, 702983256, 1547254832, 3395989288, 7433962168, 16232357608, 35359307144, 76848753032, 166658534216
Offset: 1

Views

Author

Vaclav Kotesovec, following a suggestion from Anthony Guttmann, Nov 04 2021

Keywords

Crossrefs

A369492 Triangle read by rows. An encoding of compositions of n where the first part is the largest part and the last part is not 1. The number of these compositions (the length of row n) is given by A368279.

Original entry on oeis.org

1, 0, 2, 4, 8, 10, 16, 18, 22, 32, 34, 36, 38, 42, 46, 64, 66, 68, 70, 74, 76, 78, 86, 90, 94, 128, 130, 132, 134, 136, 138, 140, 142, 146, 148, 150, 154, 156, 158, 170, 174, 182, 186, 190, 256, 258, 260, 262, 264, 266, 268, 270, 274, 276, 278, 280, 282, 284, 286
Offset: 0

Views

Author

Peter Luschny, Jan 25 2024

Keywords

Comments

The compositions are in reverse lexicographic order (see A066099).
For n = 0 we get the empty composition, which we encode by 1.
For n = 1 we get the no composition, which we encode by 0.
The definition uses two filter conditions: (a) 'the last part of the composition is not 1' and (b) 'the first part is the largest part'. By changing condition (b) to (b'), 'the parts are nonincreasing', one obtains A002865. Like the current sequence, A002865 has offset 0; the empty composition is nonincreasing (a(0) = 1), and there is no composition of 1, which has a last part that is not 1 (a(1) = 0).

Examples

			Encoding the composition as an integer, a binary string, a Dyck path, and a list.
[ n]
[ 0]    1 | 1        |  ()            | [()]
[ 1]    0 | 0        |  .             | []
[ 2]    2 | 10       |  (())          | [2]
[ 3]    4 | 100      |  ((()))        | [3]
[ 4]    8 | 1000     |  (((())))      | [4]
[ 5]   10 | 1010     |  (())(())      | [2, 2]
[ 6]   16 | 10000    |  ((((()))))    | [5]
[ 7]   18 | 10010    |  ((()))(())    | [3, 2]
[ 8]   22 | 10110    |  (())()(())    | [2, 1, 2]
[ 9]   32 | 100000   |  (((((())))))  | [6]
[10]   34 | 100010   |  (((())))(())  | [4, 2]
[11]   36 | 100100   |  ((()))((()))  | [3, 3]
[12]   38 | 100110   |  ((()))()(())  | [3, 1, 2]
[13]   42 | 101010   |  (())(())(())  | [2, 2, 2]
[14]   46 | 101110   |  (())()()(())  | [2, 1, 1, 2]
Sequence seen as table:
  [0]   1;
  [1]   0;
  [2]   2;
  [3]   4;
  [4]   8, 10;
  [5]  16, 18, 22;
  [6]  32, 34, 36, 38, 42, 46;
  [7]  64, 66, 68, 70, 74, 76, 78, 86, 90, 94;
       ...
		

Crossrefs

Subsequences: A000079, A052548\{3,6}, A369491.

Programs

  • SageMath
    # See the notebook in the links section, that includes a time and space efficient algorithm to generate the compositions. Alternatively, using SageMath's generator:
    def pr(bw, w, dw, c):
        print(f"{bw:3d} | {str(w).ljust(7)} | {str(dw).ljust(14)} | {c}")
    def Trow(n):
        row, count = [], 0
        for c in reversed(Compositions(n)):
            if c == []:
                count = 1
                pr(1, 1, "()", "[()]")
            elif c == [1]:
                pr(0, 0, ".", "[]")
            elif c[-1] != 1:
                if all(part <= c[0] for part in c):
                    w = Words([0, 1])(c.to_code())
                    dw = DyckWord(sum([[1]*a + [0]*a for a in c], []))
                    bw = int(str(w), 2)
                    row.append(bw)
                    count += 1
                    pr(bw, w, dw, c)
        # print(f"For n = {n} there are {count} composition of type A369492.")
        return row
    for n in range(0, 7): Trow(n)

A060802 To weigh from 1 to n, make the heaviest weight as small as possible, under the condition of using fewest pieces of different, single weights; a(n) = weight of the heaviest weight.

Original entry on oeis.org

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

Views

Author

Sen-Peng Eu, Apr 27 2001

Keywords

Comments

Starting at n = 2^x (x > 2) you get: 3 entries of 2^floor(log_2(x)-2)+2, then 2 entries of each subsequent integer until you reach the halfway point between 2^x and 2^(x+1), then 1 entry of each subsequent integer until you reach 2^(x+1)-1. Proved (see link). - David Consiglio, Jr., Jan 08 2015

Examples

			a(20)=7 because every number from 1 to 20 can be obtained from {1,2,4,6,7}.
		

Formula

After the 8th term:
If 2^x <= n <= (2^x)+2 then a(n) = 2 ^ floor(base2log(x)-2)+2 (see A052548)
If (2^x)+2 < n and n+1 < (2^x + 2^x+1)/2 then a(n) and a(n+1) = a(n-1)+1
If (2^x+2^x+1)/2 <= n then a(n) = a(n-1)+1. - David Consiglio, Jr., Jan 08 2015

Extensions

a(32)-a(1024) from David Consiglio, Jr., Jan 08 2015

A096068 Concatenated in binary representation: largest proper divisor of n and smallest prime factor of n.

Original entry on oeis.org

3, 6, 7, 10, 13, 14, 15, 18, 15, 22, 27, 26, 29, 30, 23, 34, 49, 38, 51, 42, 31, 46, 55, 50, 45, 54, 39, 58, 61, 62, 63, 66, 47, 70, 61, 74, 101, 78, 55, 82, 105, 86, 107, 90, 63, 94, 111, 98, 63, 102, 71, 106, 117, 110, 93, 114, 79, 118, 123, 122, 125, 126, 87, 130, 109
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2004

Keywords

Comments

a(n)=A020639(n)*A000079((A000523(A020639(n))+1))+A020639(n);
a(A005843(n))=A005843(A005408(n)); a(A000225(n))=A000225(n+1); a(A000079(n))=A052548(n+1).

Examples

			n=99: smallest factor = 3->'11' and greatest proper divisor =
99/3 = 33->'100001': '10001'&'11'='10000111'->a(99)=135.
		

Programs

  • Mathematica
    cbr[n_]:=Module[{sf=FactorInteger[n][[1,1]]},FromDigits[ Join[ IntegerDigits[ n/sf,2],IntegerDigits[sf,2]],2]]; Array[cbr,70] (* Harvey P. Dale, Jul 06 2021 *)

A134351 Binomial transform of [1, 5, -1, 5, -1, 5, ...]. Inverse binomial transform of A134350.

Original entry on oeis.org

1, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650
Offset: 1

Views

Author

Gary W. Adamson, Oct 21 2007

Keywords

Examples

			a(4) = 18 = (1, 3, 3, 1) dot (1, 5, -1, 5) = (1 + 15 - 3 + 5).
		

Crossrefs

Cf. A134350.
Essentially the same as A133140, A089985, A052548.

Programs

Formula

a(n) = 2 + 2^(n+1) for n >= 2; a(1)=1. - Emeric Deutsch, Oct 24 2007
O.g.f.: (-1-3*x+6*x^2)/((1-x)*(-1+2*x)). - R. J. Mathar, Apr 02 2008

Extensions

More terms from Emeric Deutsch, Oct 24 2007
More terms from R. J. Mathar, Apr 02 2008

A139524 Triangle T(n,k) read by rows: the coefficient of [x^k] of the polynomial 2*(x+1)^n + 2^n in row n, column k.

Original entry on oeis.org

3, 4, 2, 6, 4, 2, 10, 6, 6, 2, 18, 8, 12, 8, 2, 34, 10, 20, 20, 10, 2, 66, 12, 30, 40, 30, 12, 2, 130, 14, 42, 70, 70, 42, 14, 2, 258, 16, 56, 112, 140, 112, 56, 16, 2, 514, 18, 72, 168, 252, 252, 168, 72, 18, 2, 1026, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Jun 09 2008

Keywords

Examples

			Triangle begins as:
     3;
     4,  2;
     6,  4,  2;
    10,  6,  6,   2;
    18,  8, 12,   8,   2;
    34, 10, 20,  20,  10,   2;
    66, 12, 30,  40,  30,  12,   2;
   130, 14, 42,  70,  70,  42,  14,   2;
   258, 16, 56, 112, 140, 112,  56,  16,  2;
   514, 18, 72, 168, 252, 252, 168,  72, 18,  2;
  1026, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2;
		

References

  • Advanced Number Theory, Harvey Cohn, Dover Books, 1963, Pages 88-89

Crossrefs

Programs

  • Magma
    A139524:= func< n,k | k eq 0 select 2+2^n else 2*Binomial(n,k) >;
    [A139524(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 02 2021
    
  • Mathematica
    (* First program *)
    T[n_, k_]:= SeriesCoefficient[Series[2*(1+x)^n + 2^n, {x, 0, 20}], k];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, May 02 2021 *)
    (* Second program *)
    T[n_, k_]:= T[n, k] = If[k==0, 2 + 2^n, 2*Binomial[n, k]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 02 2021 *)
  • Sage
    def A139524(n,k): return 2+2^n if (k==0) else 2*binomial(n,k)
    flatten([[A139524(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 02 2021

Formula

Sum_{k=0..n} T(n,k) = 3*2^n = A007283(n).
From R. J. Mathar, Sep 12 2013: (Start)
T(n,0) = 2 + 2^n = A052548(n).
T(n,k) = 2*binomial(n,k) = A028326(n,k) if k>0. (End)

A174316 Sequence defined by a(0)=a(1)=a(2)=1, a(3)=2, a(4)=6 and the formula a(n)=2^(n-2)+2 for n>=5.

Original entry on oeis.org

1, 1, 1, 2, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650
Offset: 0

Views

Author

Richard Choulet, Mar 15 2010

Keywords

Examples

			a(5)=2^3+2=10. a(6)=2^4+2=18.
		

Crossrefs

Programs

  • Maple
    taylor(((1+z^3+4*z^4-4*z^5)/(1-z))+((8*z^5)/(1-2*z)),z=0,50); v(0):=1:v(1):=1:v(2):=1:v(3):=2:v(4):=6: for n from 5 to 50 do v(n):=2^(n-2)+2:od:seq(v(n),n=0..50);
  • Mathematica
    CoefficientList[Series[(1 + z + z^2 + 2*z^3 + 6*z^4 + ((2*z^5)/(1 - z)) + ((2*z)^5/(4*(1 - 2*z)))), {z, 0, 50}], z] (* Wesley Ivan Hurt, Sep 05 2025 *)

Formula

G.f.: (1+x+x^2+2*x^3+6*x^4+((2*x^5)/(1-x))+((2*x)^5/(4*(1-2*x)))).
a(n) = A052548(n-2), n>3. - R. J. Mathar, Feb 29 2016

A179282 Numbers n such that 2^n-2 and 2^n+2 are not squarefree.

Original entry on oeis.org

1, 22, 31, 64, 79, 91, 106, 111, 148, 151, 190, 205, 211, 232, 235, 271, 274, 311, 316, 331, 341, 358, 391, 400, 442, 451, 466, 484, 511, 526, 547, 551, 568, 571, 610, 613, 631, 652, 658, 667, 691, 694, 703, 736, 751, 760, 771, 778, 811, 820, 859, 862, 871, 904
Offset: 1

Views

Author

Keywords

Comments

Most (not all) of the terms are of the form:
x^2-y^2, for x>y>0.
31=16^2-15^2,
64=10^2-6^2=17^2-15^2,
79=40^2-39^2,
91=10^2-3^2=46^2-45^2,
111=20^2-17^2=56^2-55^2,
148=11^2-3^3=38^2-36^2,
151=76^2-75^2,
205=23^2-18^2=103^2-102^2,
211=106^2-105^2.

Examples

			2^22-2=2*7^2*127*337, 2^22+2=2*3^2*43*5419.
		

Crossrefs

Cf. A005117, A000918 (2^n-2), A052548 (2^n+2).

Programs

  • Mathematica
    Select[Range@211,!(SquareFreeQ[2^#-2]||SquareFreeQ[2^#+2])&]
  • PARI
    isok(n) = !issquarefree(2^n-2) && !issquarefree(2^n+2); \\ Michel Marcus, Oct 04 2019

Extensions

a(14)-a(30) from D. S. McNeil, Mar 23 2011
a(31)-a(54) from Amiram Eldar, Oct 04 2019

A254148 a(n) = 9*2^n + 7*4^n + 3*8^n + 8*3^n + 2*9^n + 6*5^n + 5*6^n + 4*7^n + 10^n + 10.

Original entry on oeis.org

55, 220, 1210, 7942, 57838, 450670, 3682030, 31153342, 270739678, 2403012910, 21693441550, 198578979742, 1838853136318, 17193665419150, 162090976108270, 1538867288166142, 14698448516729758, 141129617123665390, 1361277292619082190
Offset: 0

Views

Author

Luciano Ancora, Jan 28 2015

Keywords

Comments

This is the sequence of tenth terms of "second partial sums of m-th powers".

Crossrefs

Programs

  • PARI
    vector(30, n, n--; 9*2^n + 7*4^n + 3*8^n + 8*3^n + 2*9^n + 6*5^n + 5*6^n + 4*7^n + 10^n + 10) \\ Colin Barker, Jan 28 2015

Formula

G.f.: -(80627040*x^9 -184920912*x^8 +175484892*x^7 -91478420*x^6 +29111445*x^5 -5902743*x^4 +766458*x^3 -61710*x^2 +2805*x -55) / ((x -1)*(2*x -1)*(3*x -1)*(4*x -1)*(5*x -1)*(6*x -1)*(7*x -1)*(8*x -1)*(9*x -1)*(10*x -1)). - Colin Barker, Jan 28 2015

A334164 a(n) is the number of ON-cells in the completed n-th level of a triangular wedge in the hexagonal grid of A151723 (i.e., after 2^k >= n generations of the automaton in A151723 have been computed).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 4, 8, 2, 10, 6, 10, 4, 14, 8, 16, 2, 18, 10, 16, 8, 20, 12, 22, 6, 26, 14, 22, 8, 30, 16, 32, 2, 34, 18, 28, 16, 34, 18, 32, 14, 40, 22, 34, 16, 42, 24, 44, 10, 50, 26, 40, 20, 48, 28, 50, 14, 58, 30, 46, 16, 62, 32, 64
Offset: 1

Views

Author

Hartmut F. W. Hoft, Apr 17 2020

Keywords

Comments

Conjecture 1: Except for a(2^n + 1) = 2, n >= 1, for odd-numbered completed levels a lower bound of the ratio of ON-cells to the length of the level is (2^n + 2)/(3*2^(n+1) + 1) with limit 1/6, determined by the subsequence of levels starting with: 13, 25, 49, 97, 193, 385, 769, 1537, 3073, ..., and the associated ON-cell counts: 4, 6, 10, 18, 34, 66, 130, 258, 514, ..., as listed in the second column of each of the two triangles below.
The ON-cell counts for the indices in each row define a line of slope 1/2. The formula for the indices of levels in row k >= 2 is L(k, i) = 1 + Sum_{j = 0, ..., i} 2^(k-j), 0 <= i <= k - 2, and the formula for the associated numbers of ON-cells is C(k, i) = 2 + Sum_{j = 1..i} 2^(k-1-j), 0 <= i <= k - 2:
Index of the level: L(k, i) number of ON-cells: C(k, i)
k\i 0 1 2 3 4 5 6 k/i 0 1 2 3 4 5 6
2: 5 2: 2
3: 9 13 3: 2 4
4: 17 25 29 4: 2 6 8
5: 33 49 57 61 5: 2 10 14 16
6: 65 97 113 121 125 6: 2 18 26 30 32
7: 129 193 225 241 249 253 7: 2 34 50 58 62 64
8: 257 385 449 481 497 505 509 8: 2 66 98 114 122 126 128
...
The pairs ( L(k, i), C(k, i) ), for 0 <= i <= k-2, define a line of slope 1/2 for each k >= 3.
For triangle L(k, i): column 0 is A000051(n), n >= 2; column 1 is A181565(n), n >= 3; column 2 is A083686(n), n >= 2; columns 3 is A195744(n), n >= 1; column 4 is A206371(n), n >= 2; column 5 is A196657(n), n >= 1; the bounding diagonal is A036563(n), n >= 3.
For triangle C(k, i): column 1 is A052548(n), n >= 1; column 2 is A164094(n), n >= 1.
Conjecture 2: In an even-numbered completed level 2*n the fraction of ON-cells is bounded below by (23 * 2^n - 24)/(2^(n+5) - 36) with limit 23/32, determined by the subsequence of levels starting with: 28, 92, 220, 476, 988, 2012, 4060, ... .
There are 16 numbers less than 1000 that do not occur as the number of ON-cells in a completed level through level 16384: 136, 164, 330, 334, 402, 444, 526, 570, 598, 604, 614, 714, 740, 822, 832, 878.
Sequence A334169 of even-numbered completed levels in which all cells are ON-cells is a subsequence of this sequence.

Crossrefs

Programs

  • Mathematica
    (* a169781[] and support functions are defined in A169781 and create the list nTriangle *)
    a334164[n_] := Module[{k, levels={}}, a169781[n]; For[k=1, k<=n, k++, AppendTo[levels, Count[nTriangle[[k]], 1] - 2]]; levels]/;(n>=3 && IntegerQ[Log[2,n]])
    a334164[64] (* sequence data *)
Previous Showing 51-60 of 69 results. Next