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.

Showing 1-10 of 238 results. Next

A059594 Convolution triangle based on A008619 (positive integers repeated).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 5, 3, 1, 3, 8, 9, 4, 1, 3, 14, 19, 14, 5, 1, 4, 20, 39, 36, 20, 6, 1, 4, 30, 69, 85, 60, 27, 7, 1, 5, 40, 119, 176, 160, 92, 35, 8, 1, 5, 55, 189, 344, 376, 273, 133, 44, 9, 1, 6, 70, 294, 624, 820, 714, 434
Offset: 0

Views

Author

Wolfdieter Lang, Feb 02 2001

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as a matrix, belongs to the Bell-subgroup of the Riordan-group.
The G.f. for the row polynomials p(n,x) = Sum_{m=0..n} a(n,m)*x^m is 1/((1-z^2)*(1-z)-x*z).
The column sequences are A008619(n); A006918(n); A038163(n-2), n >= 2; A038164(n-3), n >= 3; A038165(n-4), n >= 4; A038166(n-5), n >= 5; A059595(n-6), n >= 6; A059596(n-7), n >= 7; A059597(n-8), n >= 8; A059598(n-9), n >= 9; A059625(n-10), n >= 10 for m=0..10.
The sequence of row sums is A006054(n+2).
From Gary W. Adamson, Aug 14 2016: (Start)
The sequence can be generated by extracting the descending antidiagonals of an array formed by taking powers of the natural integers with repeats, (1, 1, 2, 2, 3, 3, ...), as follows:
1, 1, 2, 2, 3, 3, ...
1, 2, 5, 8, 14, 20, ...
1, 3, 9, 19, 39, 69, ...
1, 4, 14, 36, 85, 176, ...
...
Row sums of the triangle = (1, 2, 5, 11, 25, 56, ...), the INVERT transform of (1, 1, 2, 2, 3, 3, ...). (End)

Examples

			{1}; {1,1}; {2,2,1}; {2,5,3,1}; ...
Fourth row polynomial (n=3): p(3,x)= 2 + 5*x + 3*x^2 + x^3.
		

Programs

  • Mathematica
    t[n_, m_] := Sum[Sum[Binomial[j, n-m-3*k+2*j]*(-1)^(j-k)*Binomial[k, j], {j, 0, k}]*Binomial[m+k, m], {k, 0, n-m}]; Table[t[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, May 27 2013, after Vladimir Kruchinin *)
  • Maxima
    T(n,m):=sum((sum(binomial(j,n-m-3*k+2*j)*(-1)^(j-k)*binomial(k,j),j,0,k)) *binomial(m+k,m),k,0,n-m); /* Vladimir Kruchinin, Dec 14 2011 */

Formula

a(n, m) := a(n-1, m) + (-(n-m+1)*a(n, m-1) + 3*(n+2*m)*a(n-1, m-1))/(8*m), n >= m >= 1; a(n, 0) := floor((n+2)/2) = A008619(n), n >= 0; a(n, m) := 0 if n < m.
G.f.for column m >= 0: ((x/((1-x^2)*(1-x)))^m)/((1-x^2)*(1-x)).
T(n,m) = Sum_{k=0..n-m} (Sum_{j=0..k} binomial(j, n-m-3*k+2*j)*(-1)^(j-k)*binomial(k,j))*binomial(m+k,m). - Vladimir Kruchinin, Dec 14 2011
Recurrence: T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-3,k) with T(0,0) = 1. - Philippe Deléham, Feb 23 2012

A278161 Run length transform of A008619 (floor(n/2)+1).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 3, 3, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 4, 3, 3, 3, 4, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 3, 3, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 4, 4, 4, 4, 6, 2, 2, 2, 4, 2, 2, 4, 4, 3
Offset: 0

Views

Author

Antti Karttunen, Nov 14 2016

Keywords

Examples

			n=111 is "1101111" in binary, which has two runs of 1-bits: the other has length 2, and the other has length 4, thus we take the product A008619(2)*A008619(4) = (floor(2/2)+1) * (floor(4/2)+1) = 2*3, which is the result, so a(111) = 6.
		

Crossrefs

Cf. A106737, A227349 for other run length transforms, and also A278222.

Programs

  • Mathematica
    f[n_] := Floor[n/2] + 1; Table[Times @@ (f[Length[#]]&) /@ Select[ Split[ IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 120}] (* Jean-François Alcover, Jul 11 2017 *)
  • Python
    def A278161(n): return sum(int(not (~(n+3*k) & 6*k) | (~n & k)) for k in range(n+1)) # Chai Wah Wu, Sep 28 2021
  • Scheme
    (define (A278161 n) (fold-left (lambda (a r) (* a (A008619 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
    (define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2)))
    ;; See A227349 for the required other functions.
    

Formula

a(n) = A046951(A005940(1+n)), a(A156552(n)) = A046951(n).
a(n) = Sum_{k=0..n} ((binomial(n+3k,6k)*binomial(n,k)) mod 2). - Chai Wah Wu, Nov 19 2019

A139672 Convolution of A008619 and A001400.

Original entry on oeis.org

1, 2, 5, 9, 17, 27, 44, 65, 97, 136, 191, 257, 346, 451, 587, 746, 946, 1177, 1461, 1786, 2178, 2623, 3151, 3746, 4443, 5223, 6126, 7131, 8283, 9558, 11007, 12603, 14403, 16377, 18588, 21003, 23692, 26618, 29858, 33372, 37244, 41430, 46022, 50972
Offset: 1

Views

Author

Alford Arnold, Apr 29 2008, May 01 2008

Keywords

Comments

This is row 21 of a table of values related to Molien series. It is the product of the sequence on row 3 (A008619) with the sequence on row 7 (A001400).
This table may be constructed by moving the rows of table A008284 to prime locations and generating the composite locations by multiplication in a manner similar to the calculation illustrated in the present sequence.
Rows 1 thru 20 and 22 thru 25 are as follows:

Programs

  • Maple
    a:= proc(n) local m, r; m:= iquo (n, 12, 'r'); r:= r+1; (19+ (145+ (260+ 15* (r+9)*r+ (405+ 90*r+ 216*m) *m) *m) *m) *m/5+ [0, 1, 2, 5, 9, 17, 27, 44, 65, 97, 136, 191][r]+ [0, 16, 37, 77, 128, 208, 307, 447, 616, 840, 1105, 1441][r]*m/2+ [0, 52, 119, 213, 328, 476, 651, 865, 1112, 1404, 1735, 2117][r]*m^2/2 end: seq (a(n), n=1..50); # Alois P. Heinz, Nov 10 2008
  • Mathematica
    CoefficientList[Series[x/((x^2+x+1)(x^2+1)(x+1)^3 (x-1)^6),{x,0,50}],x] (* or *) LinearRecurrence[{2,1,-3,0,-1,2,2,-1,0,-3,1,2,-1},{0,1,2,5,9,17,27,44,65,97,136,191,257},50] (* Harvey P. Dale, Feb 17 2016 *)

Formula

G.f.: x/((x^2+x+1)*(x^2+1)*(x+1)^3*(x-1)^6). - Alois P. Heinz, Nov 10 2008
a(n)= -A049347(n)/27 +(2*n+11)*(6*n^4+132*n^3+914*n^2+2068*n+1055)/69120 -(-1)^n*(51/512+n^2/256+11*n/256+A057077(n)/32 ). - R. J. Mathar, Nov 21 2008

Extensions

More terms from Alois P. Heinz, Nov 10 2008
Corrected A-number in definition. Added formula. - R. J. Mathar, Nov 21 2008

A230447 T(n, k) = T(n-1, k) + T(n-1, k-1) + A230135(n, k) with T(n, 0) = A008619(n) and T(n, n) = A080239(n+1), n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 4, 5, 3, 3, 6, 9, 8, 6, 3, 9, 16, 17, 14, 9, 4, 12, 25, 33, 32, 23, 15, 4, 16, 38, 58, 65, 55, 39, 24, 5, 20, 54, 96, 124, 120, 94, 63, 40, 5, 25, 75, 150, 220, 244, 215, 157, 103, 64, 6, 30, 100, 225, 371, 464, 459, 372, 261, 167, 104
Offset: 0

Views

Author

Johannes W. Meijer, Oct 19 2013

Keywords

Comments

The terms in the right hand columns of triangle T(n, k) and the terms in the rows of the square array Tsq(n, k) represent the Kn1p sums of the ‘Races with Ties’ triangle A035317.
For the definitions of the Kn1p sums see A180662. This sequence is related to A230448.
The first few row sums are: 1, 2, 6, 14, 32, 68, 144, 299, 616, 1258, 2559, 5185, 10478, … .

Examples

			The first few rows of triangle T(n, k) n >= 0 and 0 <= k <= n.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1
1|  1,  1
2|  2,  2,  2
3|  2,  4,  5,   3
4|  3,  6,  9,   8,   6
5|  3,  9, 16,  17,  14,    9
6|  4, 12, 25,  33,  32,   23,    15
7|  4, 16, 38,  58,  65,   55,    39,   24
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1,  1,  2,   3,   6,    9,   15,   24
1|  1,  2,  5,   8,  14,   23,   39,   63
2|  2,  4,  9,  17,  32,   55,   94,  157
3|  2,  6, 16,  33,  65,  120,  215,  372
4|  3,  9, 25,  58, 124,  244,  459,  831
5|  3, 12, 38,  96, 220,  464,  924, 1755
6|  4, 16, 54, 150, 371,  835, 1759, 3514
7|  4, 20, 75, 225, 596, 1431, 3191, 6705
		

Crossrefs

Programs

  • Maple
    T := proc(n, k): add(A035317(n-i, n-k+i), i=0..floor(k/2)) end: A035317 := proc(n, k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(T(n, k), k=0..n), n=0..10); # End first program.
    T := proc(n, k) option remember: if k=0 then return(A008619(n)) elif k=n then return(A080239(n+1)) else A230135(n, k) + procname(n-1, k) + procname(n-1, k-1) fi: end: A008619 := n -> floor(n/2) +1: A080239 := n -> add(combinat[fibonacci](n-4*k), k=0..floor((n-1)/4)): A230135 := proc(n, k): if ((k mod 4 = 2) and (n mod 2 = 1)) or ((k mod 4 = 0) and (n mod 2 = 0)) then return(1) else return(0) fi: end: seq(seq(T(n, k), k=0..n), n=0..10); # End second program.

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + A230135(n, k) with T(n, 0) = A008619(n) and T(n, n) = A080239(n+1), n >= 0 and 0 <= k <= n.
T(n, k) = sum(A035317(n-i, n-k+i), i = 0..floor(k/2)), n >= 0 and 0 <= k <= n.
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
Tsq(n, k) = sum(A035317(n+k-i, n+i), i=0..floor(k/2)), n >= 0 and k >= 0.
Tsq(n, k) = A080239(2*n+k+1) - sum(A035317(2*n+k-i, i), i=0..n-1).
The G.f. generates the terms in the n-th row of the square array Tsq(n, k).
G.f.: a(n)/(4*(x-1)) + 1/(4*(x+1)) + (-1)^n*(x+2)/(10*(x^2+1)) - (A000032(2*n+3) + A000032(2*n+2)*x)/(5*(x^2+x-1)) + sum((-1)^(k+1) * A064831(n-k+1)/((x-1)^k), k= 2..n), n >= 0, with a(n) = A064831(n+1) + 2*A064831(n) - 2*A064831(n-1) + A064831(n-2).

A164912 Dual EKG: a(n) = A008619(A064413(n) - 1).

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 31 2009

Keywords

Comments

First occurrences of n have ranks: 1, 3, 4, 8, 6, 7, 13, 11, 12, 18, ...
Second occurrences of n have ranks: 2, 5, 10, 14, 9, 20, ...
Triples of the form (a, b, a+b): (1,1,2), (3,2,5), (5,3,8), (7,4,11), (11,6,17), ... give sequence 2, 5, 8, 11, 17, ....
Every positive integer appears exactly twice. - Charlie Neder, Jan 12 2019

Crossrefs

Programs

  • Mathematica
    ekg[n_] := ekg[n] = Module[{ee, k},
         If[n <= 2, n, ee = Array[ekg, n - 1];
         For[k = 1, True, k++, If[FreeQ[ee, k] &&
         GCD[ekg[n - 1], k] != 1, Return[k]]]]];
    a[n_] := Quotient[ekg[n] - 1, 2] + 1;
    Array[a, 68] (* Jean-François Alcover, Nov 21 2021 *)

Formula

a(n) = A008619(A064413(n)-1) = ceiling(A064413(n)/2). - Charlie Neder, Jan 12 2019

Extensions

More terms from Charlie Neder, Jan 12 2019
Name modified by Jean-François Alcover, Nov 23 2021

A289806 p-INVERT of (1,1,2,2,3,3,...) (A008619), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 3, 9, 26, 74, 211, 600, 1708, 4860, 13832, 39364, 112029, 318827, 907366, 2582312, 7349121, 20915193, 59523497, 169400608, 482104856, 1372044007, 3904762096, 11112739032, 31626246588, 90006565434, 256153755080, 728999555983, 2074692805003, 5904462080604
Offset: 0

Views

Author

Clark Kimberling, Aug 12 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A289780 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    z = 60; s = x/((1 - x) (1 - x^2)); p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A008619 shifted *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A289806 *)

Formula

G.f.: (1 - x^2 + x^3)/(1 - 3 x - x^2 + 5 x^3 - 2 x^4 - 2 x^5 + x^6).
a(n) = 3*a(n-1) + a(n-2) - 5*a(n-3) + 2*a(n-4) + 2*a(n-5) - a(n-6).

A319006 Sum of the next n positive integers repeated (A008619).

Original entry on oeis.org

1, 3, 8, 18, 34, 57, 89, 132, 187, 255, 338, 438, 556, 693, 851, 1032, 1237, 1467, 1724, 2010, 2326, 2673, 3053, 3468, 3919, 4407, 4934, 5502, 6112, 6765, 7463, 8208, 9001, 9843, 10736, 11682, 12682, 13737, 14849, 16020, 17251, 18543, 19898, 21318, 22804, 24357, 25979
Offset: 1

Views

Author

Bruno Berselli, Sep 07 2018

Keywords

Examples

			Next n positive integers repeated:       Sums:
1,  ......................................   1
1, 2,  ...................................   3
2, 3, 3,  ................................   8
4, 4, 5,  5,  ............................  18
6, 6, 7,  7,  8,  ........................  34
8, 9, 9, 10, 10, 11,  ....................  57, etc.
		

Crossrefs

Sum of the next n positive integers: A006003 (after 0).

Programs

  • Magma
    [Integers()! (n*(n^2+2)+(-(n mod 2))^(n*(n-1)/2))/4: n in [1..50]];
    
  • Maple
    a := n -> (n^3 + 2*n + (-(n mod 2))^binomial(n, 2))/4:
    seq(a(n), n=1..47); # Peter Luschny, Sep 09 2018
  • Mathematica
    Table[(2 n (n^2 + 2) + (1 - (-1)^n) (-1)^((n-1)/2))/8, {n, 1, 50}]
    Module[{nn=50,lst},lst=Flatten[Table[{n,n},{n,(nn(nn+1))/2}]];Total/@ TakeList[lst,Range[nn]]] (* Requires Mathematica version 11 or later *) (* or *) LinearRecurrence[{4,-7,8,-7,4,-1},{1,3,8,18,34,57},50] (* Harvey P. Dale, Jul 10 2021 *)
  • PARI
    Vec(x*(1 - x + 3*x^2 - x^3 + x^4)/((1 + x^2)*(1 - x)^4) + O(x^50)) \\ Colin Barker, Sep 10 2018

Formula

G.f.: x*(1 - x + 3*x^2 - x^3 + x^4)/((1 + x^2)*(1 - x)^4).
a(n) = -a(-n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6).
a(n) = (2*n*(n^2 + 2) + (1 - (-1)^n)*(-1)^((n-1)/2))/8.
a(n) = A319007(n) + n.
a(n) = (n^3 + 2*n + Chi(n))/4 where Chi(n) = A101455(n). - Peter Luschny, Sep 09 2018

A164678 Convolve A008619 with sequences which map to 2,3,5,7,11,13,17... A000040 then, by bending when needed, summarize the results in a triangular array.

Original entry on oeis.org

1, 2, 1, 5, 4, 2, 9, 8, 6, 2, 17, 16, 14, 9, 3, 28, 27, 25, 20, 12, 3, 47, 46, 44, 39, 30, 16, 4, 73, 72, 70, 65, 56, 40, 20, 4, 114, 113, 111, 106, 97, 80, 55, 25, 5, 170, 169, 167, 162, 153, 136, 109, 70, 30, 5, 253, 252, 250, 245, 236, 219, 191, 147, 91, 36, 6, 365
Offset: 1

Views

Author

Alford Arnold, Aug 25 2009

Keywords

Comments

Sequence A164680 is not in the triangle since 45 = 3*15 and 15 is not a member of A000040 (the prime numbers).

Examples

			The desired triangle begins:
.1
.2..1
.5..4..2
.9..8..6..2
17.16.14..9..3
28.27.25.20.12..3
47.46.44.39.30.16..4
etc.
Note that 21 = 3*7 maps to 1,2,5,9,17,27,44,... A139672 is embedded in the triangle.
		

Crossrefs

Cf. A008619 A002620 A006918 A097701 A139672 ... A000097 (embedded sequences).

A180116 A008619(n-1)-fold concatenation of A109613(n).

Original entry on oeis.org

1, 3, 33, 55, 555, 777, 7777, 9999, 99999, 1111111111, 111111111111, 131313131313, 13131313131313, 15151515151515, 1515151515151515, 1717171717171717, 171717171717171717, 191919191919191919, 19191919191919191919, 21212121212121212121, 2121212121212121212121
Offset: 1

Views

Author

Mark Dols, Aug 10 2010

Keywords

Comments

Written underneath, the first terms have increasing lengths filling a triangular shape:
1,
3,
33,
55,
555,
777,
...

Crossrefs

Programs

  • Maple
    cat2 := proc(a,b) a*10^(max(1,1+ilog10(b)))+b ; end proc:
    A008619 := proc(n) 1+floor(n/2) ; end proc:
    A109613 := proc(n) 2*floor(n/2)+1 ; end proc:
    A180116 := proc(n) a := A109613(n) ; for t from 2 to A008619(n-1) do a := cat2(a,A109613(n)) ; end do: a ; end proc:
    seq(A180116(n),n=1..24) ; # R. J. Mathar, Sep 19 2010

Extensions

Edited by R. J. Mathar, Sep 19 2010

A213046 Convolution of Lucas numbers and positive integers repeated (A000032 and A008619).

Original entry on oeis.org

2, 3, 8, 13, 25, 41, 71, 116, 193, 314, 514, 834, 1356, 2197, 3562, 5767, 9339, 15115, 24465, 39590, 64067, 103668, 167748, 271428, 439190, 710631, 1149836, 1860481, 3010333, 4870829, 7881179, 12752024, 20633221, 33385262, 54018502, 87403782, 141422304
Offset: 0

Views

Author

Clark Kimberling, Jun 10 2012

Keywords

Crossrefs

Cf. A213500.

Programs

  • Magma
    /* By definition */ A008619:=func; [&+[A008619(i)*Lucas(n-i): i in [0..n]]: n in [0..34]];
    
  • Mathematica
    f[x_] := (1 + x) (1 - x)^2; g[x] := 1 - x - x^2;
    s = Normal[Series[(2 - x)/(f[x] g[x]), {x, 0, 60}]]
    CoefficientList[s, x]  (* A213046 *)
    LinearRecurrence[{2,1,-3,0,1},{2,3,8,13,25},40] (* Harvey P. Dale, Aug 31 2023 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,0,-3,1,2]^n*[2;3;8;13;25])[1,1] \\ Charles R Greathouse IV, Jan 29 2016
    
  • PARI
    Vec((-2 + x)/((-1 + x)^2*(-1 + 2*x^2 + x^3)) + O(x^60)) \\ Colin Barker, Feb 09 2017

Formula

a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5).
G.f.: (-2 + x)/((-1 + x)^2*(-1 + 2*x^2 + x^3)).
a(n) = (-9/4 + (3*(-1)^n)/4 + (2^(-n)*((1-t)^n*(-5+2*t) + (1+t)^n*(5+2*t)))/t + (-1-n)/2) where t=sqrt(5). - Colin Barker, Feb 09 2017
Showing 1-10 of 238 results. Next