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

A225078 Numbers n such that n^2+1 and (n+1)^2-2 are both prime.

Original entry on oeis.org

1, 2, 4, 6, 14, 20, 26, 36, 54, 74, 116, 120, 126, 130, 134, 160, 176, 204, 210, 230, 236, 256, 264, 284, 300, 314, 340, 386, 420, 440, 466, 490, 496, 544, 594, 636, 644, 714, 750, 760, 784, 816, 930, 950, 986, 1070, 1124, 1140, 1146, 1156, 1174, 1176, 1210
Offset: 1

Views

Author

César Aguilera, Apr 26 2013

Keywords

Comments

Prime limits of the Legendré conjecture for a given n.

Examples

			n=2; n+1=3 ;n^2+1=5 and (n+1)^2-2=7.
n=490; n+1=491; n^2+1=240101 and (n+1)^2-2=241079.
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    import Data.List (elemIndices)
    a225078 n = a225078_list !! (n-1)
    a225078_list = elemIndices 1 $
       zipWith ((*) `on` a010051') a002522_list a008865_list
    -- Reinhard Zumkeller, May 06 2013
  • Mathematica
    Select[Range[2000], PrimeQ[#^2 + 1] && PrimeQ[(# + 1)^2 - 2] &] (* T. D. Noe, May 06 2013 *)

A241201 a(n) is the least r such that there are n+2 consecutive increasing terms in the r-th row of Pascal's triangle (binomial(r,*)) which satisfy a polynomial of degree n.

Original entry on oeis.org

7, 14, 62, 31, 339, 1022
Offset: 1

Views

Author

T. D. Noe, Apr 21 2014

Keywords

Comments

Old definition: "Numbers k such that n+2 consecutive terms of binomial(n,k) satisfy a polynomial relation of degree n for some k in the range 0 <= k <= n/2.".
Is this sequence finite?

Examples

			a(1) = 7 because the 3 terms 7, 21, 35 are linear.
		

Crossrefs

Cf. A008865 (binomial(n,k) has 3 consecutive terms in a linear relation).
Cf. A062730 (3 terms in arithmetic progression in Pascal's triangle).
Cf. A241199, A241200 (similar, but quadratic).
Cf. A241202 (position of the first of terms).

Programs

  • Mathematica
    t = Table[k = 1; While[b = Binomial[k, Range[0, k/2]]; d = Differences[b, n + 1]; ! MemberQ[d, 0], k++]; {k, Position[d, 0, 1, 1][[1, 1]] - 1}, {n, 6}]; Transpose[t][[1]]

Extensions

Definition clarified by Don Reble, Dec 14 2020

A241202 Beginning of a polynomial relation of degree n in n+2 terms in the first half of Pascal's triangle. See A241201.

Original entry on oeis.org

1, 2, 26, 9, 149, 489
Offset: 1

Views

Author

T. D. Noe, Apr 21 2014

Keywords

Comments

Is this sequence finite?

Crossrefs

Cf. A008865 (binomial(n,k) has 3 consecutive terms in a linear relation).
Cf. A062730 (3 terms in arithmetic progression in Pascal's triangle).
Cf. A241199, A241200 (similar, but quadratic).

Programs

  • Mathematica
    t = Table[k = 1; While[b = Binomial[k, Range[0, k/2]]; d = Differences[b, n + 1]; ! MemberQ[d, 0], k++]; {k, Position[d, 0, 1, 1][[1, 1]] - 1}, {n, 6}]; Transpose[t][[2]]

A293620 Numbers k such that f(k), f(k+1) and f(k+2) are all primes, where f(k) = (2k+1)^2 - 2 (A073577).

Original entry on oeis.org

1, 2, 16, 58, 149, 177, 534, 681, 954, 1045, 1052, 1255, 1367, 1563, 2046, 2074, 2515, 2557, 2564, 2788, 3586, 3593, 3908, 4062, 4552, 5252, 5371, 5385, 6400, 6729, 7443, 7478, 9305, 9375, 9942, 10355, 10411, 10726, 10740, 11286, 11545, 11559, 11832, 11965
Offset: 1

Views

Author

Amiram Eldar, Oct 13 2017

Keywords

Comments

Sierpiński proved that under Schinzel's hypothesis H this sequence is infinite.
Sierpiński showed that the only quadruple of consecutive primes of the form (2k+1)^2 - 2 are for k = 1 (i.e., 1 and 2 are the only consecutive terms in this sequence).
Numbers k such that the 3 consecutive integers k, k+1 and k+2 belong to A088572. - Michel Marcus, Oct 13 2017

Examples

			The first triples are: k = 1: (7, 23, 47), k = 2: (23, 47, 79), k = 16: (1087, 1223, 1367).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4], AllTrue[{(2#+1)^2-2, (2#+3)^2-2, (2#+5)^2-2},PrimeQ] &]
    SequencePosition[Table[If[PrimeQ[(2k+1)^2-2],1,0],{k,12000}],{1,1,1}][[;;,1]] (* Harvey P. Dale, Feb 09 2025 *)
  • PARI
    f(n) = 4*n^2 + 4*n - 1;
    isok(n) = isprime(f(n)) && isprime(f(n+1)) && isprime(f(n+2)); \\ Michel Marcus, Oct 13 2017

A316649 Triangle read by rows in which T(n,k) is the number of length k chains from (0,0) to (n,n) of the poset [n] X [n] ordered by the product order, 0 <= k <= 2n, n>=0.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 7, 12, 6, 0, 1, 14, 55, 92, 70, 20, 0, 1, 23, 153, 471, 780, 720, 350, 70, 0, 1, 34, 336, 1584, 4251, 7002, 7238, 4592, 1638, 252, 0, 1, 47, 640, 4210, 16175, 39733, 65226, 72660, 54390, 26250, 7392, 924, 0, 1, 62, 1107, 9596, 49225, 164898, 380731, 623576, 732618, 614700, 360162, 140184, 32604, 3432
Offset: 0

Views

Author

Geoffrey Critzer, Jul 09 2018

Keywords

Examples

			Triangle begins:
  1;
  0, 1,  2;
  0, 1,  7,  12,    6;
  0, 1, 14,  55,   92,   70,   20;
  0, 1, 23, 153,  471,  780,  720,  350,   70;
  0, 1, 34, 336, 1584, 4251, 7002, 7238, 4592, 1638, 252;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A008865(n+1) for n>0.
Row sums give A052141.
T(n,n) gives A108628(n-1) for n>0.
T(n,2n) gives A000984.
Cf. A007318.

Programs

  • Maple
    b:= proc(n, m) option remember; expand(`if`(n+m=0, 1, add(add(
         `if`(i+j=0, 0, b(sort([n-i, m-j])[])*x), j=0..m), i=0..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..8);  # Alois P. Heinz, Jul 10 2018
  • Mathematica
    Join[{{1}},Table[a =Sort[Level[Table[Table[{i, j}, {i, 0, n}], {j, 0, n}], {2}]];f[list1_, list2_] :=Boole[(list1 - list2)[[1]] < 1 \[And] (list1 - list2)[[2]] < 1];m = Table[Table[f[a[[l]], a[[k]]], {k, 1, Length[a]}], {l, 1, Length[a]}];Prepend[Table[
         MatrixPower[m - IdentityMatrix[(n + 1)^2], k][[1, (n + 1)^2]], {k, 1, 2 n}], 0], {n, 1, 7}]] // Grid

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

A363365 Array read by ascending antidiagonals: A(1, k) = k; for n > 1, A(n, k) = (k + 1)*A(n-1, k) + k + 1 - n, with k > 0.

Original entry on oeis.org

1, 2, 2, 3, 7, 3, 4, 21, 14, 4, 5, 62, 57, 23, 5, 6, 184, 228, 117, 34, 6, 7, 549, 911, 586, 207, 47, 7, 8, 1643, 3642, 2930, 1244, 333, 62, 8, 9, 4924, 14565, 14649, 7465, 2334, 501, 79, 9, 10, 14766, 58256, 73243, 44790, 16340, 4012, 717, 98, 10
Offset: 1

Views

Author

Stefano Spezia, May 29 2023

Keywords

Examples

			The array begins:
  1,   2,    3,     4,     5, ...
  2,   7,   14,    23,    34, ...
  3,  21,   57,   117,   207, ...
  4,  62,  228,   586,  1244, ...
  5, 184,  911,  2930,  7465, ...
  6, 549, 3642, 14649, 44790, ...
  ...
		

Crossrefs

Cf. A000027 (n=1 or k=1), A008865, A051846 (diagonal), A064017 (k=9), A353094 (k=2), A353095 (k=3), A353096 (k=4), A353097 (k=5), A353098 (k=6), A353099 (k=7), A353100 (k=8), A363366 (antidiagonal sums).

Programs

  • Mathematica
    A[n_,k_]:=((k-1)*(k+1)^(n+1)+k*n-k^2+1)/k^2; Table[A[n-k+1,k],{n,10},{k,n}]//Flatten (* or *)
    A[n_,k_]:=SeriesCoefficient[x*(k-(k+1)*x)/((1-x)^2*(1-(k+1)*x)),{x,0,n}]; Table[A[n-k+1,k],{n,10},{k,n}]//Flatten (* or *)
    A[n_,k_]:=n!SeriesCoefficient[Exp[x]((k^2-1)(Exp[k x]-1)+k x)/k^2,{x,0,n}]; Table[A[n-k+1,k],{n,10},{k,n}]//Flatten

Formula

A(n, k) = ((k - 1)*(k + 1)^(n+1) + k*n - k^2 + 1)/k^2.
O.g.f. of k-th column: x*(k - (k + 1)*x)/((1 - x)^2*(1 - (k + 1)*x)).
E.g.f. of k-th column: exp(x)*((k^2 - 1)*(exp(k*x) - 1) + k*x)/k^2.
A(2, n) = A008865(n+1).

A386206 Triangle read by rows: T(n,k) = n^2 - k, with 0 <= k <= n.

Original entry on oeis.org

0, 1, 0, 4, 3, 2, 9, 8, 7, 6, 16, 15, 14, 13, 12, 25, 24, 23, 22, 21, 20, 36, 35, 34, 33, 32, 31, 30, 49, 48, 47, 46, 45, 44, 43, 42, 64, 63, 62, 61, 60, 59, 58, 57, 56, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90
Offset: 0

Views

Author

Stefano Spezia, Jul 15 2025

Keywords

Examples

			The triangle begins as:
   0;
   1,  0;
   4,  3,  2;
   9,  8,  7,  6;
  16, 15, 14, 13, 12;
  25, 24, 23, 22, 21, 20;
  36, 35, 34, 33, 32, 31, 30;
  49, 48, 47, 46, 45, 44, 43, 42;
  64, 63, 62, 61, 60, 59, 58, 57, 56;
  ...
		

Crossrefs

Cf. A000290 (k=0), A002414 (row sums), A005563, A008865, A028347 (k=4), A028872 (k=3), A028875 (k=5), A279019 (diagonal).

Programs

  • Magma
    [[n^2-k: k in [0..n]]: n in [0..9]]; // Vincenzo Librandi, Jul 17 2025
  • Mathematica
    T[n_,k_]:=n^2-k; Table[T[n,k],{n,0,10},{k,0,n}]//Flatten

Formula

G.f.: x*(1 + x + 2*x*y^2 + 5*x^3*y^2 - x^2*y*(4 + 5*y))/((1 - x)^3*(1 - x*y)^3).
T(n,1) = A005563(n-1) for n > 0.
T(n,2) = A008865(n) for n > 1.

A386481 Array read by upward antidiagonals: T(k,n) = 1 (k = 0, n >= 0), T(k,n) = binomial(n,2)*k^2 + n*(k-1) + 1 (k >= 1, n >= 0).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 7, 4, 1, 1, 4, 14, 16, 7, 1, 1, 5, 23, 34, 29, 11, 1, 1, 6, 34, 58, 63, 46, 16, 1, 1, 7, 47, 88, 109, 101, 67, 22, 1, 1, 8, 62, 124, 167, 176, 148, 92, 29, 1, 1, 9, 79, 166, 237, 271, 259, 204, 121, 37, 1, 1, 10, 98, 214, 319, 386, 400, 358, 269, 154, 46, 1, 1, 11, 119, 268, 413, 521, 571, 554, 473, 343, 191, 56, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 11 2025

Keywords

Comments

T(k,n) is the maximum number of regions the plane can be divided into by drawing n k-armed long-legged V's.

Examples

			Array begins (the rows are T(0,n>=0),, T(1,n>=0), T(2,n>=0), ...):
   1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   1, 1, 2, 4, 7, 11, 16, 22, 29, ...
   1, 2, 7, 16, 29, 46, 67, 92, 121, ...
   1, 3, 14, 34, 63, 101, 148, 204, 269, ...
   1, 4, 23, 58, 109, 176, 259, 358, 473, ...
   1, 5, 34, 88, 167, 271, 400, 554, 733, ...
   1, 6, 47, 124, 237, 386, 571, 792, 1049, ...
   1, 7, 62, 166, 319, 521, 772, 1072, 1421, ...
    ...
The first few antidiagonals are:
    1,
    1, 1,
    1, 1, 1,
    1, 2, 2, 1,
    1, 3, 7, 4, 1,
    1, 4, 14, 16, 7, 1,
    1, 5, 23, 34, 29, 11, 1,
    1, 6, 34, 58, 63, 46, 16, 1,
    1, 7, 47, 88, 109, 101, 67, 22, 1,
     ...
		

References

  • David O. H. Cutler and Neil J. A. Sloane, Cutting a pancake with an exotic knife, Paper in preparation, Sep 05 2025

Crossrefs

This is a companion to the array A386478.
The rows and columns include A000124, A130883, A140064, A383464, and A008865.

A163159 Fibonacci numbers F such that F^2-2 is prime.

Original entry on oeis.org

2, 3, 5, 13, 21, 55, 89, 233, 987, 1597, 5702887, 1836311903, 99194853094755497, 26925748508234281076009, 184551825793033096366333, 468340976726457153752543329995929, 30010821454963453907530667147829489881, 1188518561323126046432205871807859915657177
Offset: 1

Views

Author

Keywords

Comments

In condensed representation: The A000045(i) at i = 3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 34, 46,... [R. J. Mathar, Jul 25 2009]

Examples

			2^2-2=2. 3^2-2=7. 5^2-2=23.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Fibonacci[n]; f2[n_]:=f[n]^2-2; lst={};Do[If[PrimeQ[f2[n]],AppendTo[lst, f[n]]],{n,6!}];lst
    Select[Fibonacci[Range[400]],PrimeQ[#^2-2]&] (* Harvey P. Dale, Oct 21 2011 *)

Formula

{A000045(i): A008865(A000045(i)) in A000040}. [R. J. Mathar, Jul 25 2009]

Extensions

More terms from Harvey P. Dale, Oct 21 2011
Previous Showing 51-60 of 63 results. Next