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-9 of 9 results.

A007401 Add n-1 to n-th term of 'n appears n times' sequence (A002024).

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Keywords

Comments

Complement of A000096 = increasing sequence of positive integers excluding n*(n+3)/2. - Jonathan Vos Post, Aug 13 2005
As a triangle: (1; 3,4; 6,7,8; 10,11,12,13; ...), Row sums = A127736: (1, 7, 21, 46, 85, 141, 217, ...). - Gary W. Adamson, Oct 25 2007
Odd primes are a subsequence except 5, cf. A004139. - Reinhard Zumkeller, Jul 18 2011
A023532(a(n)) = 1. - Reinhard Zumkeller, Dec 04 2012
T(n,k) = ((n+k)^2+n-k)/2 - 1, n,k > 0, read by antidiagonals. - Boris Putievskiy, Jan 14 2013
A023531(a(n)) = 0. - Reinhard Zumkeller, Feb 14 2015

Examples

			From _Boris Putievskiy_, Jan 14 2013: (Start)
The start of the sequence as table:
   1,  3,  6, 10, 15, 21, 28, ...
   4,  7, 11, 16, 22, 29, 37, ...
   8, 12, 17, 23, 30, 38, 47, ...
  13, 18, 24, 31, 39, 48, 58, ...
  19, 25, 32, 40, 49, 59, 70, ...
  26, 33, 41, 50, 60, 71, 83, ...
  34, 42, 51, 61, 72, 84, 97, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   3,  4;
   6,  7,  8;
  10, 11, 12, 13;
  15, 16, 17, 18, 19;
  21, 22, 23, 24, 25, 26;
  28, 29, 30, 31, 32, 33, 34;
  ...
Row number r contains r numbers r*(r+1)/2, r*(r+1)/2+1, ..., r*(r+1)/2+r-1. (End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007401 n = a007401_list !! n
    a007701_list = [x | x <- [0..], a023531 x == 0]
    -- Reinhard Zumkeller, Feb 14 2015, Dec 04 2012
    
  • Mathematica
    f[n_] := n + Floor[ Sqrt[2n] - 1/2]; Array[f, 66]; (* Robert G. Wilson v, Feb 13 2011 *)
  • PARI
    a(n)=n+floor(sqrt(n+n)-1/2) \\ Charles R Greathouse IV, Feb 13 2011
    
  • PARI
    for(m=1,9, for(n=m*(m+1)/2,(m^2+3*m-2)/2, print1(n", "))) \\ Charles R Greathouse IV, Feb 13 2011
    
  • Python
    from math import isqrt
    def A007401(n): return n-1+(isqrt(n<<3)+1>>1) # Chai Wah Wu, Oct 18 2022

Formula

From Boris Putievskiy, Jan 14 2013: (Start)
a(n) = A014132(n) - 1.
a(n) = A003057(n)^2 - A114327(n) - 1.
a(n) = ((t+2)^2 + i - j)/2-1, where
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n,
t = floor((-1+sqrt(8*n-7))/2). (End)

A162610 Triangle read by rows in which row n lists n terms, starting with 2n-1, with gaps = n-1 between successive terms.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 7, 10, 13, 16, 9, 13, 17, 21, 25, 11, 16, 21, 26, 31, 36, 13, 19, 25, 31, 37, 43, 49, 15, 22, 29, 36, 43, 50, 57, 64, 17, 25, 33, 41, 49, 57, 65, 73, 81, 19, 28, 37, 46, 55, 64, 73, 82, 91, 100, 21, 31, 41, 51, 61, 71, 81, 91, 101, 111, 121
Offset: 1

Views

Author

Omar E. Pol, Jul 09 2009

Keywords

Comments

Note that the last term of the n-th row is the n-th square A000290(n).
Row sums are n*(n^2+2*n-1)/2, apparently in A127736. - R. J. Mathar, Jul 20 2009

Examples

			Triangle begins:
1
3, 4
5, 7, 9
7, 10, 13, 16
9, 13, 17, 21, 25
11, 16, 21, 26, 31, 36
		

Crossrefs

Cf. A209297; A005408 (left edge), A000290 (right edge), A127736 (row sums), A056220 (central terms), A026741 (number of odd terms per row), A142150 (number of even terms per row), A221491 (number of primes per row).

Programs

  • Haskell
    a162610 n k = k * n - k + n
    a162610_row n = map (a162610 n) [1..n]
    a162610_tabl = map a162610_row [1..]
    -- Reinhard Zumkeller, Jan 19 2013
  • Mathematica
    Flatten[Table[NestList[#+n-1&,2n-1,n-1], {n,15}]] (* Harvey P. Dale, Oct 20 2011 *)
  • Python
    # From R. J. Mathar, Oct 20 2009
    def A162610(n, k):
        return 2*n-1+(k-1)*(n-1)
    print([A162610(n,k) for n in range(1,20) for k in range(1,n+1)])
    

Formula

T(n,k) = n+k*n-k, 1<=k<=n. - R. J. Mathar, Oct 20 2009
T(n,k) = (k+1)*(n-1)+1. - Reinhard Zumkeller, Jan 19 2013

Extensions

More terms from R. J. Mathar, Oct 20 2009

A127735 Triangle read by rows: A127701 * A002260 as infinite lower triangular matrices.

Original entry on oeis.org

1, 3, 4, 4, 8, 9, 5, 10, 15, 16, 6, 12, 18, 24, 25, 7, 14, 21, 28, 35, 36, 8, 16, 24, 32, 40, 48, 49, 9, 18, 27, 36, 45, 54, 63, 64, 10, 20, 30, 40, 50, 60, 70, 80, 81, 11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 121, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 144
Offset: 1

Views

Author

Gary W. Adamson, Jan 26 2007

Keywords

Examples

			First few rows of the triangle are:
1;
3, 4;
4, 8, 9;
5, 10, 15, 16;
6, 12, 18, 24, 25;
...
		

Crossrefs

Formula

Row sums = A127736: (1, 7, 21, 46, 85, 141, ...).
T(n,n) = n^2. T(n,k) = k*(n+1), 1<=kR. J. Mathar, Jul 21 2009

Extensions

A-number of left factor in the definition corrected by R. J. Mathar, Jul 21 2009
a(19) corrected and more terms from Georg Fischer, Jun 05 2023

A208656 Triangle T(n, k) = n*C(n,k) - C(n-1,k-1), 1 <= k <= n, read by rows.

Original entry on oeis.org

0, 3, 1, 8, 7, 2, 15, 21, 13, 3, 24, 46, 44, 21, 4, 35, 85, 110, 80, 31, 5, 48, 141, 230, 225, 132, 43, 6, 63, 217, 427, 525, 413, 203, 57, 7, 80, 316, 728, 1078, 1064, 700, 296, 73, 8, 99, 441, 1164, 2016, 2394, 1974, 1116, 414, 91, 9, 120, 595, 1770
Offset: 1

Views

Author

Clark Kimberling, Mar 01 2012

Keywords

Comments

Mirror of A208657.
col 1: A005563
col 2: A127736
top edge: A000027

Examples

			First five rows:
0
3....1
8....7....2
15...21...13...3
24...46...44...21...4
		

Crossrefs

Programs

  • Mathematica
    z = 12;
    f[n_, k_] := n*Binomial[n, k] - Binomial[n - 1, k - 1]
    t = Table[f[n, k], {n, 1, z}, {k, 1, n}];
    TableForm[t] (* A208656 as a triangle *)
    Flatten[t]   (* A208656 as a sequence *)
    r = Table[f[n, k], {n, 1, z}, {k, n, 1, -1}];
    TableForm[r] (* A208657 as a triangle *)
    Flatten[r]   (* A208657 as a sequence *)
    Table[Sum[f[n, k], {k, 1, n}], {n, 1, 3 z}](* A208658 *)

Extensions

Definition amended by Georg Fischer, Feb 01 2022

A237664 Interpolation polynomial through n+1 points (0,1), (1,1), ..., (n-1,1) and (n,n) evaluated at 2n.

Original entry on oeis.org

0, 1, 7, 41, 211, 1009, 4621, 20593, 90091, 388961, 1662805, 7054321, 29745717, 124807201, 521515801, 2171645281, 9016205851, 37337699521, 154277300101, 636214748401, 2619084047581, 10765157488801, 44186078238121, 181135476007201, 741694884711301
Offset: 0

Views

Author

Alois P. Heinz, Feb 11 2014

Keywords

Crossrefs

Cf. A000290 (evaluated at n+1), A127736 (at n+2), A237622 (n points).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
           ((n-1)*(3*n-4)*(5*n-3) *a(n-1)
            -2*(2*n-3)*(3*n^2-4*n+2) *a(n-2))/
            (n*(3*n^2-10*n+9)))
        end:
    seq(a(n), n=0..30);
  • Mathematica
    CoefficientList[Series[(6*x-1)/Sqrt[1-4*x]^3-1/(x-1), {x, 0, 20}], x] (* Vaclav Kotesovec, Feb 14 2014 *)
    a[n_] := Module[{m}, InterpolatingPolynomial[Table[{k, If[k == n, n, 1]}, {k, 0, n}], m] /. m -> 2n];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 22 2020 *)

Formula

G.f.: (6*x-1)/sqrt(1-4*x)^3 - 1/(x-1).
a(n) ~ sqrt(n)*4^n/sqrt(Pi). - Vaclav Kotesovec, Feb 14 2014
From Gregory Morse, Mar 19 2021: (Start)
a(n) = (2*n)!*(n-1)/(n!)^2 + 1.
a(n) = A030662(n-1)*(n-1) + n, for n > 0. (End)
E.g.f.: exp(x) * (1 - exp(x) * ((1 - 2*x) * BesselI(0,2*x) - 2 * x * BesselI(1,2*x))). - Ilya Gutkovskiy, Nov 19 2021

A349427 a(n) = ((n+1)^2 - 2) * binomial(2*n-2,n-1) / 2.

Original entry on oeis.org

0, 1, 7, 42, 230, 1190, 5922, 28644, 135564, 630630, 2892890, 13117676, 58903572, 262303132, 1159666900, 5094808200, 22259364120, 96773942790, 418882316490, 1805951924700, 7758285404100, 33221013445620, 141830949914940, 603876402587640, 2564713671647400
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 17 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[((n + 1)^2 - 2) Binomial[2 n - 2, n - 1]/2, {n, 0, 24}]
    nmax = 24; CoefficientList[Series[x (1 - x) (1 - 2 x)/(1 - 4 x)^(5/2), {x, 0, nmax}], x]
  • PARI
    a(n) = ((n+1)^2 - 2) * binomial(2*n-2,n-1) / 2 \\ Andrew Howroyd, Nov 20 2021

Formula

G.f.: x * (1 - x) * (1 - 2*x) / (1 - 4*x)^(5/2).
E.g.f.: x * exp(2*x) * (2 * (1 + x) * BesselI(0,2*x) + (1 + 2*x) * BesselI(1,2*x)) / 2.
a(n) = n * ((n+1)^2 - 2) * Catalan(n-1) / 2.
a(n) = Sum_{k=0..n} binomial(n,k)^2 * A000217(k).
a(n) ~ 2^(2*n-3) * n^(3/2) / sqrt(Pi).
D-finite with recurrence (n-1)*(n^2-2)*a(n) -2*(2*n-3)*(n^2+2*n-1)*a(n-1)=0. - R. J. Mathar, Mar 06 2022

A131784 Triangle read by rows: (A004736 + A002260 - I) * A000012.

Original entry on oeis.org

1, 5, 2, 11, 7, 3, 19, 14, 9, 4, 29, 23, 17, 11, 5, 41, 34, 27, 20, 13, 6, 55, 47, 39, 31, 23, 15, 7, 71, 62, 53, 44, 35, 26, 17, 8, 89, 79, 69, 59, 49, 39, 29, 19, 9, 109, 98, 87, 76, 65, 54, 43, 32, 21, 10, 131, 119, 107, 95, 83, 71, 59, 47, 35, 23, 11, 155, 142, 129, 116, 103, 90, 77, 64, 51, 38, 25, 12
Offset: 1

Views

Author

Gary W. Adamson, Jul 16 2007

Keywords

Examples

			First few rows of the triangle:
   1;
   5,  2;
  11,  7,  3;
  19, 14,  9,  4;
  29, 23, 17, 11,  5;
  41, 34, 27, 20, 13,  6;
  55, 47, 39, 31, 23, 15,  7;
  ...
		

Crossrefs

Cf. A004736, A002260, A127736 (row sums), A028387 (left column).

Formula

Equals (A004736 + A002260 - I) * A000012, I = Identity matrix.

Extensions

a(35) corrected and more terms from Georg Fischer, Aug 09 2023

A134390 Duplicate of A131416.

Original entry on oeis.org

1, 4, 3, 8, 8, 5, 13, 14, 12, 7, 19, 21, 20, 16, 9, 26, 29, 29, 26, 20, 11, 34, 38, 39, 37, 32, 24, 13, 43, 48, 50, 49, 45, 38, 28, 15, 53, 59, 62, 62, 59, 53, 44, 32, 17, 64, 71, 75, 76, 74, 69, 61, 50, 36, 19, 76, 84, 89, 91, 90, 86, 79, 69, 56, 40, 21, 89, 98, 104, 107, 107, 104, 98, 89, 77, 62, 44, 23
Offset: 1

Views

Author

Gary W. Adamson, Oct 23 2007

Keywords

Comments

Row sums = A127736: (1, 7, 21, 46, 85, 141, 217, ...).

Examples

			First few rows of the triangle:
   1;
   4,  3;
   8,  8,  5;
  13, 14, 12,  7;
  19, 21, 20, 16,  9;
  26, 29, 29, 26, 20, 11;
  ...
		

Crossrefs

Formula

(A000012 * A002260 + A002260 * A000012) - A000012 as infinite lower triangular matrices; where A000012 = (1; 1,1; 1,1,1; ...) and A002260 = (1; 1,2; 1,2,3; ...).

Extensions

a(6) corrected and more terms from Georg Fischer, Jun 05 2023

A330892 Square array of polygonal numbers read by descending antidiagonals (the transpose of A317302).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, -3, 1, 1, 0, -8, 0, 2, 1, 0, -15, -2, 3, 3, 1, 0, -24, -5, 4, 6, 4, 1, 0, -35, -9, 5, 10, 9, 5, 1, 0, -48, -14, 6, 15, 16, 12, 6, 1, 0, -63, -20, 7, 21, 25, 22, 15, 7, 1, 0, -80, -27, 8, 28, 36, 35, 28, 18, 8, 1, 0, -99, -35, 9, 36, 49, 51, 45, 34, 21, 9, 1, 0
Offset: 1

Views

Author

Robert G. Wilson v, Apr 27 2020

Keywords

Comments

\c 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
r\
_0 0 1 0 -3 -8 -15 -24 -35 -48 -63 -80 -99 -120 -143 -168 -195 A067998
_1 0 1 1 0 -2 -5 -9 -14 -20 -27 -35 -44 -54 -65 -77 -90 A080956
_2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 A001477
_3 0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 A000217
_4 0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 A000290
_5 0 1 5 12 22 35 51 70 92 117 145 176 210 247 287 330 A000326
_6 0 1 6 15 28 45 66 91 120 153 190 231 276 325 378 435 A000384
_7 0 1 7 18 34 55 81 112 148 189 235 286 342 403 469 540 A000566
_8 0 1 8 21 40 65 96 133 176 225 280 341 408 481 560 645 A000567
_9 0 1 9 24 46 75 111 154 204 261 325 396 474 559 651 750 A001106
10 0 1 10 27 52 85 126 175 232 297 370 451 540 637 742 855 A001107
11 0 1 11 30 58 95 141 196 260 333 415 506 606 715 833 960 A051682
12 0 1 12 33 64 105 156 217 288 369 460 561 672 793 924 1065 A051624
13 0 1 13 36 70 115 171 238 316 405 505 616 738 871 1015 1170 A051865
14 0 1 14 39 76 125 186 259 344 441 550 671 804 949 1106 1275 A051866
15 0 1 15 42 82 135 201 280 372 477 595 726 870 1027 1197 1380 A051867
...
Each row has a second forward difference of (r-2) and each column has a forward difference of c(c-1)/2.

Crossrefs

Cf. A317302 (the same array) but read by ascending antidiagonals.
Sub-arrays: A089000, A139600, A206735;
Number of times k>1 appears: A129654, First occurrence of k: A063778.

Programs

  • Mathematica
    Table[ PolygonalNumber[r - c, c], {r, 0, 11}, {c, r, 0, -1}] // Flatten

Formula

P(r, c) = (r - 2)(c(c-1)/2) + c.
Showing 1-9 of 9 results.