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

A298675 Rectangular array A: first differences of row entries of array A294099, read by antidiagonals.

Original entry on oeis.org

1, 2, -1, 3, 2, -2, 4, 7, 2, -1, 5, 14, 18, 2, 1, 6, 23, 52, 47, 2, 2, 7, 34, 110, 194, 123, 2, 1, 8, 47, 198, 527, 724, 322, 2, -1, 9, 62, 322, 1154, 2525, 2702, 843, 2, -2, 10, 79, 488, 2207, 6726, 12098, 10084, 2207, 2, -1, 11, 98, 702, 3842, 15127, 39202, 57965, 37634, 5778, 2, 1
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
From Charles L. Hohn, Sep 28 2024: (Start)
For rows n >= 3, values x >= 3 where (x^2-4)/(n^2-4) is a square.
For rows n >= 3, Lim_{k->oo}(T(n, k+1)/T(n, k)) = (sqrt(n^2-4)+n)/2. (End)

Examples

			Array begins:
   1 -1  -2   -1     1      2       1       -1        -2         -1
   2  2   2    2     2      2       2        2         2          2
   3  7  18   47   123    322     843     2207      5778      15127
   4 14  52  194   724   2702   10084    37634    140452     524174
   5 23 110  527  2525  12098   57965   277727   1330670    6375623
   6 34 198 1154  6726  39202  228486  1331714   7761798   45239074
   7 47 322 2207 15127 103682  710647  4870847  33385282  228826127
   8 62 488 3842 30248 238142 1874888 14760962 116212808  914941502
   9 79 702 6239 55449 492802 4379769 38925119 345946302 3074591599
  10 98 970 9602 95050 940898 9313930 92198402 912670090 9034502498
		

Crossrefs

Programs

  • Mathematica
    t[n_, 0] := 2; t[n_, 1] := n; t[n_, k_] := n*t[n, k - 1] - t[n, k - 2]; Table[t[n, k], {n, 10}, {k, 10}] // Grid

Formula

A(n,k) = T_k(n), n >= 1, k >= 1, where T_j(x) = x*T_{j-1}(x) - T_{j-2}(x), j >= 2, T_0(x) = 2, T_1(x) = x, (dilated Chebyshev polynomials of the first kind).

A269254 To find a(n), define a sequence by s(k) = n*s(k-1) - s(k-2), with s(0) = 1, s(1) = n + 1; then a(n) is the smallest index k such that s(k) is prime, or -1 if no such k exists.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, -1, 2, 2, 1, 2, 1, 2, -1, 2, 1, 3, 1, 2, 2, 2, 1, -1, 2, 6, 2, 3, 1, 3, 1, 2, 9, 9, -1, 2, 1, 6, 2, 2, 1, 2, 1, 5, 2, 2, 1, -1, 2, 5, 2, 9, 1, 2, 2, 2, 2, 6, 1, 2, 1, 14, -1, 5, 2, 2, 1, 5, 2, 3, 1, 6, 1, 8, 3, 6, 2, 3, 1, -1, 3, 18, 1, 2, 3, 2, 2, 3, 1, 2, 9, 3, 5, 2, 2, 96, 1, 3, -1, 5, 1, 2, 1, 2, 15, 14, 1, 44, 1, 3, -1
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 09 2016

Keywords

Comments

The s(k) sequences can be viewed in A294099, where they appear as rows. - Peter Munn, Aug 31 2020
For n >= 3, a(n) is that positive integer k yielding the smallest prime of the form (x^y - 1/x^y)/(x - 1/x), where x = (sqrt(n+2) +- sqrt(n-2))/2 and y = 2*k + 1, or -1 if no such k exists.
Every positive term belongs to A005097.
When n=7, the sequence {s(k)} is A033890, which is Fibonacci(4i+2), and since x|y <=> F_x|F_y, and 2i+1|4i+2, A033890 is never prime, and so a(7)=-1. For the other -1 terms below 100, see the theorem below and the Klee link - N. J. A. Sloane, Oct 20 2017 and Oct 22 2017
Theorem (Brad Klee): For all n > 2, a(n^2 - 2) = -1. See Klee link for a proof. - L. Edson Jeffery, Oct 22 2017
Theorem (Based on work of Hans Havermann, L. Edson Jeffery, Brad Klee, Don Reble, Bob Selcoe, and N. J. A. Sloane) a(110) = -1. [For proof see link. - N. J. A. Sloane, Oct 23 2017]
From Bob Selcoe, Oct 24 2017, edited by N. J. A. Sloane, Oct 27 2017: (Start)
Suppose n = m^2 - 2, where m >= 3, and let j = m-2, with j >= 1.
For this value of n, the sequence s(k) satisfies s(k) = (c(k) + d(k))*(c(k) - d(k)), where c(0) = 1, d(0) = 0; and for k >= 1: c(k) = (j+2)*c(k-1) - d(k-1), and d(k) = c(k-1). So (as Brad Klee already proved) a(n) = -1 .
We have s(0) = 1 and s(1) = n+1 = j^2 + 4j + 3. In general, the coefficients of s(k) when expanded in powers of j are given by the (4k+2)-th row of A011973 (the triangle of coefficients of Fibonacci polynomials) in reverse order. For example, s(2) = j^4 + 8j^3 + 21j^2 + 20j + 5, s(3) = j^6 + 12j^5 + 55j^4 + 120j^3 + 126j^2 + 56j + 7, etc.
Perhaps the above comments could be generalized to apply to a(110) or to other n for which a(n) = -1?
(End)
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018

Examples

			Let b(k) be the recursive sequence defined by the initial conditions b(0) = 1, b(1) = 16, and the recursive equation b(k) = 15*b(k-1) - b(k-2). a(15) = 2 because b(2) = 239 is the smallest prime in b(k).
Let c(k) be the recursive sequence defined by the initial conditions c(0) = 1, c(1) = 18, and the recursive equation c(k) = 17*c(k-1) - c(k-2). a(17) = 3 because c(3) = 5167 is the smallest prime in c(k).
		

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [1..85] do if n gt 2 and IsSquare(n+2) then Append(~lst, -1); else a:=n+1; c:=1; t:=1; if IsPrime(a) then Append(~lst, t); else repeat b:=n*a-c; c:=a; a:=b; t+:=1; until IsPrime(a); Append(~lst, t); end if; end if; end for; lst;
    
  • Mathematica
    kmax = 100;
    a[1] = a[2] = 1;
    a[n_ /; IntegerQ[Sqrt[n+2]]] = -1;
    a[n_] := Module[{s}, s[0] = 1; s[1] = n+1; s[k_] := s[k] = n s[k-1] - s[k-2]; For[k=1, k <= kmax, k++, If[PrimeQ[s[k]], Return[k]]]; Print["For n = ", n, ", k = ", k, " exceeds the limit kmax = ", kmax]; -1];
    Array[a, 110] (* Jean-François Alcover, Aug 05 2018 *)
  • PARI
    allocatemem(2^30);
    default(primelimit,(2^31)+(2^30));
    s(n,k) = if(0==k,1,if(1==k,(1+n),((n*s(n,k-1)) - s(n,k-2))));
    A269254(n) = { my(k=1); if((n>2)&&issquare(2+n),-1,while(!isprime(s(n,k)),k++);(k)); }; \\ Antti Karttunen, Oct 20 2017

Formula

If n is prime then a(n-1) = 1.

Extensions

a(86)-a(94) from Antti Karttunen, Oct 20 2017
a(95)-a(109) appended by L. Edson Jeffery, Oct 22 2017

A294099 Rectangular array read by (upward) antidiagonals: A(n,k) = Sum_{j=0..k} (-1)^floor(j/2)*binomial(k-floor((j+1)/2), floor(j/2))*n^(k-j), n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 4, 5, -1, 1, 5, 11, 7, -2, 1, 6, 19, 29, 9, -1, 1, 7, 29, 71, 76, 11, 1, 1, 8, 41, 139, 265, 199, 13, 2, 1, 9, 55, 239, 666, 989, 521, 15, 1, 1, 10, 71, 377, 1393, 3191, 3691, 1364, 17, -1, 1, 11, 89, 559, 2584, 8119, 15289, 13775, 3571, 19, -2
Offset: 1

Views

Author

Keywords

Comments

This array is used to compute A269254: A269254(n) = least k such that A(n,k) is a prime, or -1 if no such k exists.
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018
The array can be extended to k<0 with A(n, k) = -A(n, -k-1) for all k in Z. - Michael Somos, Jun 19 2023

Examples

			Array begins:
  1   2    1    -1     -2      -1        1         2          1          -1
  1   3    5     7      9      11       13        15         17          19
  1   4   11    29     76     199      521      1364       3571        9349
  1   5   19    71    265     989     3691     13775      51409      191861
  1   6   29   139    666    3191    15289     73254     350981     1681651
  1   7   41   239   1393    8119    47321    275807    1607521     9369319
  1   8   55   377   2584   17711   121393    832040    5702887    39088169
  1   9   71   559   4401   34649   272791   2147679   16908641   133121449
  1  10   89   791   7030   62479   555281   4935050   43860169   389806471
  1  11  109  1079  10681  105731  1046629  10360559  102558961  1015229051
		

Crossrefs

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[LinearRecurrence[{n, -1}, {1, 1 + n}, 10], {n, 10}]]
    (* Array antidiagonals flattened (gives this sequence): *)
    A294099[n_, k_] := Sum[(-1)^(Floor[j/2]) Binomial[k - Floor[(j + 1)/2], Floor[j/2]] n^(k - j), {j, 0, k}]; Flatten[Table[A294099[n - k, k], {n, 11}, {k, 0, n - 1}]]
  • PARI
    {A(n, k) = sum(j=0, k, (-1)^(j\2)*binomial(k-(j+1)\2, j\2)*n^(k-j))}; /* Michael Somos, Jun 19 2023 */

Formula

A(n,0) = 1, A(n,1) = n + 1, A(n,k) = n*A(n,k-1) - A(n,k-2), n >= 1, k >= 2.
G.f. for row n: (1 + x)/(1 - n*x + x^2), n >= 1.
A(n, k) = B(-n, k) where B = A299045. - Michael Somos, Jun 19 2023

A299109 Probable primes in A030221.

Original entry on oeis.org

29, 139, 3191, 15289, 350981, 1681651, 20344613659, 2237722536169, 5650248517599839, 1464318118372209903213451940281613111, 471219735266432821374794400248484805597413615642086220363989152195627985749609
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
Subsequent terms have too many digits to display.

Crossrefs

Formula

a(n) = A030221(A299101(n)).

A298677 a(n) = 110*a(n-1) - a(n-2) for n >= 2, a(0)=1, a(1)=111.

Original entry on oeis.org

1, 111, 12209, 1342879, 147704481, 16246150031, 1786928798929, 196545921732159, 21618264461738561, 2377812544869509551, 261537761671184312049, 28766775971285404815839, 3164083819079723345430241, 348020453322798282592510671, 38279085781688731361830743569, 4210351415532437651518789281919
Offset: 0

Views

Author

Keywords

Comments

Sequence {s_k(110)} of A269254.
The sequence contains no primes; see A269254 for a proof by N. J. A. Sloane.
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018

Crossrefs

Programs

  • Mathematica
    s[0, n_] := 1; s[1, n_] := n + 1; s[k_, n_] := n*s[k - 1, n] - s[k - 2, n]; Table[s[k, 110], {k, 0, 15}]
    LinearRecurrence[{110, -1}, {1, 111}, 15]
    CoefficientList[Series[(1 + x)/(1 - 110*x + x^2), {x, 0, 14}], x]
  • PARI
    Vec((1 + x)/(1 - 110*x + x^2) + O(x^20)) \\ Colin Barker, Jan 25 2018

Formula

G.f.: (1 + x)/(1 - 110*x + x^2).
a(n) = (1/18)*((55+12*sqrt(21))^(-n)*(9-2*sqrt(21) + (9+2*sqrt(21))*(55+12*sqrt(21))^(2*n))). - Colin Barker, Jan 25 2018

A117522 Numbers k such that L(2*k + 1) is prime, where L(m) is a Lucas number.

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 15, 18, 20, 23, 26, 30, 35, 39, 56, 156, 176, 251, 306, 308, 431, 548, 680, 2393, 2396, 2925, 3870, 4233, 5345, 6125, 6981, 7224, 9734, 17724, 18389, 22253, 25584, 28001, 40835, 44924, 47411, 70028, 74045, 79760, 91544, 96600, 101333, 172146, 193716, 221804, 266138, 287109, 308393, 315590, 318875, 325910, 346073, 450828, 525924
Offset: 1

Views

Author

Parthasarathy Nambi, Apr 26 2006

Keywords

Comments

For n = 24..43, we can only claim that L(2*a(n) + 1) is a probable prime. Sequence arises in a study of A269254; for detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018

Examples

			If k = 56, then L(2*k + 1) is a prime with twenty-four digits.
		

Crossrefs

Extensions

Values beyond 680 from L. Edson Jeffery, et al., Feb 02 2018
a(44)-a(56) from Robert Price, Jun 12 2025
a(57)-a(59) (using data in A001606) from Alois P. Heinz, Jun 12 2025

A299045 Rectangular array: A(n,k) = Sum_{j=0..k} (-1)^floor(j/2)*binomial(k-floor((j+1)/2), floor(j/2))*(-n)^(k-j), n >= 1, k >= 0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, -1, -1, 1, -2, 1, 1, 1, -3, 5, -1, 0, 1, -4, 11, -13, 1, -1, 1, -5, 19, -41, 34, -1, 1, 1, -6, 29, -91, 153, -89, 1, 0, 1, -7, 41, -169, 436, -571, 233, -1, -1, 1, -8, 55, -281, 985, -2089, 2131, -610, 1, 1, 1, -9, 71, -433, 1926, -5741, 10009, -7953, 1597, -1, 0
Offset: 1

Views

Author

Keywords

Comments

This array is used to compute A269252: A269252(n) = least k such that |A(n,k)| is a prime, or -1 if no such k exists.
For detailed theory, see [Hone].
The array can be extended to k<0 with A(n, k) = -A(n, -k-1) for all k in Z. - Michael Somos, Jun 19 2023

Examples

			Array begins:
1   0  -1     1     0      -1       1         0        -1           1
1  -1   1    -1     1      -1       1        -1         1          -1
1  -2   5   -13    34     -89     233      -610      1597       -4181
1  -3  11   -41   153    -571    2131     -7953     29681     -110771
1  -4  19   -91   436   -2089   10009    -47956    229771    -1100899
1  -5  29  -169   985   -5741   33461   -195025   1136689    -6625109
1  -6  41  -281  1926  -13201   90481   -620166   4250681   -29134601
1  -7  55  -433  3409  -26839  211303  -1663585  13097377  -103115431
1  -8  71  -631  5608  -49841  442961  -3936808  34988311  -310957991
1  -9  89  -881  8721  -86329  854569  -8459361  83739041  -828931049
		

Crossrefs

Cf. A094954 (unsigned version of this array, but missing the first row).

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[LinearRecurrence[{-n, -1}, {1, 1 - n}, 10], {n, 10}]]
    (*Array antidiagonals flattened (gives this sequence):*)
    A299045[n_, k_] := Sum[(-1)^(Floor[j/2]) Binomial[k - Floor[(j + 1)/2], Floor[j/2]] (-n)^(k - j), {j, 0, k}]; Flatten[Table[A299045[n - k, k], {n, 11}, {k, 0, n - 1}]]
  • PARI
    {A(n, k) = sum(j=0, k, (-1)^(j\2)*binomial(k-(j+1)\2, j\2)*(-n)^(k-j))}; /* Michael Somos, Jun 19 2023 */

Formula

G.f. for row n: (1 + x)/(1 + n*x + x^2), n >= 1.
A(n, k) = B(-n, k) where B = A294099. - Michael Somos, Jun 19 2023

A299071 Union_{odd primes p, n >= 3} {T_p(n)}, where T_m(x) = x*T_{m-1}(x) - T_{m-2}(x), m >= 2, T_0(x) = 2, T_1(x) = x (dilated Chebyshev polynomials of the first kind).

Original entry on oeis.org

18, 52, 110, 123, 198, 488, 702, 724, 843, 970, 1298, 1692, 2158, 2525, 3330, 4048, 4862, 5778, 6726, 6802, 7940, 9198, 10084, 10582, 13752, 15550, 17498, 19602, 21868, 24302, 26910, 29698, 30248, 32672, 35838, 39603, 42770, 46548, 50542
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
Sequence avoids numbers of the form T_p(T_2(j)).

Crossrefs

Programs

  • Mathematica
    maxT = 55000; maxn = 12;
    T[0][] = 2; T[1][x] = x;
    T[m_][x_] := T[m][x] = x T[m-1][x] - T[m-2][x];
    TT = Table[T[p][n], {p, Prime[Range[2, maxn]]}, {n, 3, Prime[maxn]}] // Flatten // Union // Select[#, # <= maxT&]&;
    avoid = Table[T[p][T[2][n]], {p, Prime[Range[2, maxn]]}, {n, 3, Prime[maxn] }] // Flatten // Union // Select[#, # <= maxT&]&;
    Complement[TT, avoid] (* Jean-François Alcover, Nov 03 2018 *)

A299100 Indices k such that s_k(4) is a (probable) prime, where s_k(4) = 4*s_{k-1}(4) - s_{k-2}(4), k >= 2, s_0(4) = 1, s_1(4) = 5.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 18, 146, 216, 293, 704, 1143, 1530, 1593, 2924, 7163, 9176, 9489, 11531, 39543, 50423, 60720, 62868, 69993, 69995, 88103, 88163, 104606, 164441, 178551
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
a(31) > 2*10^5. - Robert Price, May 29 2020

Crossrefs

Programs

  • Mathematica
    s[k_, m_] := s[k, m] = Which[k == 0, 1, k == 1, 1 + m, True, m s[k - 1, m] - s[k - 2, m]]; Select[Range@ 2000, PrimeQ@ Abs@ s[#, 4] &] (* Michael De Vlieger, Feb 03 2018 *)

Extensions

a(24)-a(30) from Robert Price, May 29 2020

A299101 Indices of (probable) primes in A030221.

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 15, 18, 23, 53, 114, 194, 564, 575, 585, 2594, 3143, 4578, 4970, 9261, 11508, 13298, 30018, 54993, 198476
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
a(25) > 2*10^5. - Robert Price, Jul 03 2020

Crossrefs

Programs

Formula

A299109(n) = A030221(a(n)). - R. J. Mathar, Jul 22 2022

Extensions

a(24) from Robert Price, Jul 03 2020
Showing 1-10 of 14 results. Next