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

A259549 Triangle T(n,k) with rows of length 2n-1 filled with consecutive integers, each appearing twice except for the last term, T(n,2n-1) = n(n+1)/2.

Original entry on oeis.org

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

Views

Author

Craig Knecht, Jun 30 2015

Keywords

Comments

This sequence is derived from the water retention heights between a group of hexagonally packed, vertically oriented cylinders. The cylinders fill an equilateral triangle. The cylinder height is specified by sequential natural numbers.
This entry is motivated by A258445 and A259052. The water retention on mathematical surfaces concept uses the integer values to specify the height of cylinders. Three touching cylinders define the retention unit and thus a relationship between 3 integers. Taking the minimum, maximum or sum of these three integers provides the data points to construct a new triangle. The water retention between three cylinders is the minimum of the three heights.
The row sums for the minimum of three terms in this triangle are A081436.
The retention values between rows can be thought of having a wave form with peak and trough values. These peak and trough values correspond to A006002 and A006003. This water retention business shows that A081436(n) = A006002(n) + A006003(n+1).
In general any 2D arrangement of numbers can be subdivided by up and down retention triples.
The terms of the "flattened" sequence (concatenation of the rows) are the positive integers, repeated twice except for (1, 3, 6, 10, ...) = triangular numbers A000217, which are only listed once. - M. F. Hasler, Aug 11 2015

Examples

			The irregular triangle T(n,k) starts:
n/k 1  2  3  4  5  6  7  8  9 10 11
1:  1
2:  2  2  3
3:  4  4  5  5  6
4:  7  7  8  8  9  9 10
5: 11 11 12 12 13 13 14 14 15
6: 16 16 17 17 18 18 19 19 20 20 21
		

Crossrefs

Partial sums of A071028.

Programs

  • PARI
    a259549(nmax) = { /* Give the first nmax rows */
      my(L=List(), t);
      for(n=1, nmax,
        t=(n^2-n+2)/2;
        for(k=0, n-2,
          listput(L, t+k); listput(L, t+k)
        );
        listput(L, n*(n+1)/2)
      );
      Vec(L)
    }
    a259549(6) \\ Colin Barker, Jul 04 2015
    
  • PARI
    A259549(n,k)=(n^2-n+k+1)\2 \\ M. F. Hasler, Aug 11 2015

Formula

a(n) = (1/4)*(2*t(n) + 1 - (-1)^t(n)), where t(n) = n + floor(sqrt(n)). - Ridouane Oudra, Jun 08 2019

Extensions

More terms from Colin Barker, Jul 04 2015

A350266 Triangle read by rows. T(n, k) = binomial(n, k) * n! / (n - k + 1)! if k >= 1, if k = 0 then T(n, k) = k^n. T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 3, 9, 6, 0, 4, 24, 48, 24, 0, 5, 50, 200, 300, 120, 0, 6, 90, 600, 1800, 2160, 720, 0, 7, 147, 1470, 7350, 17640, 17640, 5040, 0, 8, 224, 3136, 23520, 94080, 188160, 161280, 40320, 0, 9, 324, 6048, 63504, 381024, 1270080, 2177280, 1632960, 362880
Offset: 0

Views

Author

Peter Luschny, Jan 09 2022

Keywords

Examples

			Table starts:
[0] 1;
[1] 0, 1;
[2] 0, 2,   2;
[3] 0, 3,   9,    6;
[4] 0, 4,  24,   48,    24;
[5] 0, 5,  50,  200,   300,    120;
[6] 0, 6,  90,  600,  1800,   2160,     720;
[7] 0, 7, 147, 1470,  7350,  17640,   17640,    5040;
[8] 0, 8, 224, 3136, 23520,  94080,  188160,  161280,   40320;
[9] 0, 9, 324, 6048, 63504, 381024, 1270080, 2177280, 1632960, 362880;
		

Crossrefs

A350267 (row sums), A000142 (main diagonal), A074143 (subdiagonal), A006002 (column 2), A089835 (central terms).

Programs

  • Maple
    T := (n, k) -> ifelse(k = 0, k^n, binomial(n, k)^2 * k! / (n - k + 1)):
    seq(seq(T(n, k), k = 0..n), n = 0..9);
  • Mathematica
    T[n_, 0] := Boole[n == 0]; T[n_, k_] := Binomial[n, k]^2 * k!/(n - k + 1); Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, Jan 09 2022 *)

Formula

T(n, k) = binomial(n, k)^2 * k! / (n - k + 1) if k >= 1.

A355006 Triangle read by rows. T(n, k) = n^(n - k) * |Stirling1(n, k)|.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 18, 9, 1, 0, 384, 176, 24, 1, 0, 15000, 6250, 875, 50, 1, 0, 933120, 355104, 48600, 3060, 90, 1, 0, 84707280, 29647548, 3899224, 252105, 8575, 147, 1, 0, 10569646080, 3425697792, 430309376, 27725824, 1003520, 20608, 224, 1
Offset: 0

Views

Author

Peter Luschny, Jun 17 2022

Keywords

Examples

			Table T(n, k) begins:
[0] 1;
[1] 0,           1;
[2] 0,           2,          1;
[3] 0,          18,          9,         1;
[4] 0,         384,        176,        24,        1;
[5] 0,       15000,       6250,       875,       50,       1;
[6] 0,      933120,     355104,     48600,     3060,      90,     1;
[7] 0,    84707280,   29647548,   3899224,   252105,    8575,   147,   1;
[8] 0, 10569646080, 3425697792, 430309376, 27725824, 1003520, 20608, 224, 1;
		

Crossrefs

A152684 (column 1), A006002 (subdiagonal), A092985 (row sums), A355007.

Programs

  • Maple
    seq(seq(n^(n - k)*abs(Stirling1(n, k)), k = 0..n), n = 0..9);
  • Mathematica
    T[n_, k_] := If[n == k == 0, 1, n^(n - k) * Abs[StirlingS1[n, k]]]; Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Amiram Eldar, Jun 17 2022 *)

A095834 Triangle read by rows: T(n,k) = (n-k)*n, n>=1, 1<=k<=n.

Original entry on oeis.org

0, 2, 0, 6, 3, 0, 12, 8, 4, 0, 20, 15, 10, 5, 0, 30, 24, 18, 12, 6, 0, 42, 35, 28, 21, 14, 7, 0, 56, 48, 40, 32, 24, 16, 8, 0, 72, 63, 54, 45, 36, 27, 18, 9, 0, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 110, 99, 88, 77, 66, 55, 44, 33, 22, 11, 0, 132, 120, 108, 96, 84, 72, 60, 48, 36, 24
Offset: 1

Views

Author

Herman Jamke (hermanjamke(AT)fastmail.fm), Jul 10 2004

Keywords

Examples

			 0
 2  0
 6  3  0
12  8  4  0
20 15 10  5  0
30 24 18 12  6  0
42 35 28 21 14  7  0
56 48 40 32 24 16  8  0
		

Crossrefs

Cf. A006002 (row sums).

A182050 Number of odd primes between successive numbers of the form n*(n+1)^2/2.

Original entry on oeis.org

0, 3, 5, 6, 9, 10, 14, 18, 21, 23, 28, 32, 35, 43, 45, 51, 58, 55, 71, 72, 79, 84, 92, 95, 107, 117, 116, 119, 146, 134, 159, 156, 162, 178, 189, 196, 202, 214, 217, 240, 238, 250, 264, 278, 276, 296, 308, 324, 327, 332, 357, 369, 372, 395, 395, 416, 441, 429, 451, 466, 480, 501
Offset: 1

Views

Author

Gerasimov Sergey, Apr 08 2012

Keywords

Examples

			There is no odd prime between 0 and 2. There are three odd primes between 2 and 9.
		

Crossrefs

Cf. A006002.

Programs

  • Mathematica
    Join[{0}, Differences[PrimePi[Table[n (n + 1)^2/2, {n, 1, 62}]]]] (* T. D. Noe, Apr 09 2012 *)

A182071 Number of primes in the half-open interval [n*sqrt((n-1)/2), (n+1)*sqrt(n/2)).

Original entry on oeis.org

0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 2, 1, 1, 1, 1, 2, 1, 1, 2, 0, 3, 1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 0, 1, 3, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 0, 1, 3, 3, 0, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 1, 3, 0, 2, 1, 2
Offset: 1

Views

Author

Gerasimov Sergey, Apr 10 2012

Keywords

Examples

			a(1)=0 because are no primes in half-open interval [1*sqrt((1-1)/2), (1+1)*sqrt(1/2)),
a(2)=1 because prime 2 is in half-open interval [2*sqrt((2-1)/2), (2+1)*sqrt(2/2)),
a(3)=1 because primes 3 is in half-open interval [3*sqrt((3-1)/2),(3+1)*sqrt(3/2)),
a(4)=2 because primes 5,7 are in half-open interval [4*sqrt((4-1)/2), (4+1)*sqrt(4/2)).
		

Crossrefs

Cf. A006002.

Programs

  • Maple
    with(numtheory);
    f:=proc(n) local t1,t2,eps;
    t1:=floor((n+1)*sqrt(n/2));
    if t1 = (n+1)*sqrt(n/2) then t1:=t1-1; fi;
    t2:=ceil(n*sqrt((n-1)/2));
    eps:=0;
    if isprime(t2) then eps:=1; fi;
    pi(t1)-pi(t2)+eps;
    end;
    [seq(f(n),n=1..120)]; # N. J. A. Sloane, Apr 26 2012

A209777 Number of q in the range 0<=q<=n for which k(n)+k(q) is prime, with k(n) := n*(n+1)^2/2.

Original entry on oeis.org

1, 1, 0, 1, 0, 2, 1, 0, 0, 3, 0, 1, 2, 0, 0, 2, 1, 3, 1, 0, 0, 9, 1, 0, 2, 2, 0, 2, 1, 2, 4, 0, 0, 6, 1, 1, 5, 4, 1, 3, 2, 3, 2, 0, 0, 15, 0, 2, 2, 3, 3, 7, 1, 4, 2, 1, 3, 17, 2, 1, 6, 5, 1, 4, 2, 8, 3, 0, 0, 7, 2, 3, 9, 3, 1, 2, 0, 9, 1, 0, 2, 21, 1, 4, 6, 9, 2, 5, 2, 4, 6, 3, 3, 16, 2, 2, 4, 5, 1, 2
Offset: 1

Views

Author

Gerasimov Sergey, Mar 27 2012

Keywords

Examples

			a(6)=2 because 147+2 and 147+50 are primes;
a(10)=3 because 605+2, 605+224 and 605+324 are primes.
		

Crossrefs

Extensions

Corrected by R. J. Mathar, Mar 30 2012

A341768 a(n) = n * (binomial(n,2) - 2).

Original entry on oeis.org

0, -2, -2, 3, 16, 40, 78, 133, 208, 306, 430, 583, 768, 988, 1246, 1545, 1888, 2278, 2718, 3211, 3760, 4368, 5038, 5773, 6576, 7450, 8398, 9423, 10528, 11716, 12990, 14353, 15808, 17358, 19006, 20755, 22608, 24568, 26638, 28821, 31120, 33538, 36078, 38743, 41536, 44460
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 19 2021

Keywords

Comments

The n-th second n-gonal number.

Examples

			a(7) = A147875(7) = A000566(-7) = 133.
		

Crossrefs

Programs

  • Mathematica
    Table[n (Binomial[n, 2] - 2), {n, 0, 45}]
    LinearRecurrence[{4, -6, 4, -1}, {0, -2, -2, 3}, 46]
    CoefficientList[Series[-x (2 - 6 x + x^2)/(1 - x)^4, {x, 0, 45}], x]

Formula

G.f.: -x*(2 - 6*x + x^2)/(1 - x)^4.
E.g.f.: -exp(x)*x*(4 - 2*x - x^2)/2.
a(n) = n^2*(n - 1)/2 - 2*n.

A387123 Numbers k such that Sum_{i=1..r} (k-i) and Sum_{i=1..r} (k+i) are both triangular for some r with 1 <= r < k.

Original entry on oeis.org

2, 6, 9, 21, 24, 38, 50, 53, 65, 77, 90, 96, 104, 133, 147, 195, 201, 224, 247, 286, 324, 377, 450, 483, 553, 588, 605, 614, 713, 792, 901, 1014, 1029, 1043, 1066, 1074, 1155, 1274, 1349, 1575, 1784, 1885, 1920, 2034, 2057, 2109, 2279, 2312, 2342, 2622
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 17 2025

Keywords

Comments

For m >= 1, if k = m*(m+1)^2/2 then r = m, thus A006002 is a subsequence. For k >= 286 from A101265 or A101879, r = k-1.

Examples

			For k = 6: the least r = 5, T_i = 1 + 2 + 3 + 4 + 5 = 15, T_j = 7 + 8 + 9 + 10 + 11 = 45, both T_i and T_j are triangular numbers, thus k = 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ[Sqrt[8*n + 1]]; q[k_] := Module[{r = 1, s1 = 0, s2 = 0}, While[s1 += k - r; s2 += k + r; r < k && (! triQ[s1] || ! triQ[s2]), r++]; 1 <= r < k]; Select[Range[3000], q] (* Amiram Eldar, Aug 17 2025 *)
  • PARI
    isok(k) = my(sm=0, sp=0); for (r=1, k-1, sm+=k-r; sp+=k+r; if (ispolygonal(sm, 3) && ispolygonal(sp, 3), return(r));); \\ Michel Marcus, Aug 17 2025
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A387123_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            if any(is_square(((k*r<<1)-r*(r+1)<<2)+1) and is_square(((k*r<<1)+r*(r+1)<<2)+1) for r in range(1,k)):
                yield k
    A387123_list = list(islice(A387123_gen(),50)) # Chai Wah Wu, Aug 21 2025
Previous Showing 51-59 of 59 results.