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 11-16 of 16 results.

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

A299107 Probable primes in sequence {s_k(4)}, 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

5, 19, 71, 3691, 191861, 138907099, 26947261171, 436315574686414344004975231616076636245689199862837798457639364993981991744926792179
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) = s_{A299100(n)}(4) = A001834(A299100(n)).

A298878 Union_{p prime, n >= 0} {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

-2, -1, 0, 1, 2, 7, 14, 18, 23, 34, 47, 52, 62, 79, 98, 110, 119, 123, 142, 167, 194, 198, 223, 254, 287, 322, 359, 398, 439, 482, 488, 527, 574, 623, 674, 702, 724, 727, 782, 839, 843, 898, 959, 970, 1022, 1087, 1154, 1223, 1294, 1298, 1367, 1442, 1519, 1598
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].

Crossrefs

A269251 a(n) = smallest prime in the sequence s(k) = n*s(k-1) - s(k-2), with s(0) = 1, s(1) = n - 1 (or a(n) = -1 if no such prime exists).

Original entry on oeis.org

-1, -1, 2, 3, 19, 5, 41, 7, 71, 89, 109, 11, 2003, 13, 3121, 239, 271, 17, 729962708557509701, 19, 419, 461, 11593, 23, 599, 11356201, 701, 11546481261621528160662473705515857458665002781273993, 811, 29, 929
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 09 2016

Keywords

Comments

For n >= 2, smallest prime of the form (x^y + 1/x^y)/(x + 1/x), where x = (sqrt(n+2) +- sqrt(n-2))/2 and y is an odd positive integer, or -1 if no such prime exists.
If a(34) > 0 then a(34) > 10^1000. - Robert Israel, Feb 06 2018
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018
Values of n where a(n) might need more than 1000 digits: 34, 52, 123, 254, 275, 285, 322, 371, 401, 413, 437, 460, 508, 518, 535, 540, 629, 643, 653, 691, 723, 724, 753, 797, 837, 843, 876, 881, 898, 913, 960, 970, 981, 986, 987, ... - Jean-François Alcover, Mar 01 2018

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [1..31] do if n le 2 then Append(~lst, 0); else a:=1; c:=1; repeat b:=n*a-c; c:=a; a:=b; until IsPrime(a); Append(~lst, a); end if; end for; lst;
  • Maple
    f:= proc(n) local a,b,t;
    a:= 1; b:= n-1;
    do
      if isprime(b) then return b fi;
      t:= n*b-a;
      a:= b;
      b:= t;
    od
    end proc:
    f(1):= -1: f(2):= -1:
    map(f, [$1..33]); # Robert Israel, Feb 06 2018
  • Mathematica
    max = 10^1000; a[1] = a[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, s[k] <= max, k++, If[PrimeQ[s[k]], Return[s[k]]]]] /. Null -> -1; Table[a[n], {n, 1, 33}] (* Jean-François Alcover, Mar 01 2018 *)

Formula

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

Extensions

Changed the value for the exceptional case from 0 to -1 for consistency with other sequences. - N. J. A. Sloane, Jan 19 2018

A269252 Define a sequence by s(k) = n*s(k-1) - s(k-2), with s(0) = 1, s(1) = n - 1. 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, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 1, 14, 1, 2, 2, 3, 1, 2, 5, 2, 36, 2, 1, 2, 1, 15, -1, 6, 2, 3, 1, 2, 2, 6, 1, 3, 1, 2, 2, 2, 1, 2, 3, 2, -1, 3, 1, 2, 2, 2, 6, 3, 1, 2, 1, 30, 3, 2, 2, 2, 1, 2, 5, 2, 1, 5, 1, 6, 3, 2, 6, 3, 1, 8, 6, 14, 1, 3
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 09 2016

Keywords

Comments

For n >= 2, 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.
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) = 10, and the recursive equation b(k) = 11*b(k-1) - b(k-2). a(11) = 2 because b(2) = 109 is the smallest prime in b(k).
Let c(k) be the recursive sequence defined by the initial conditions c(0) = 1, c(1) = 12, and the recursive equation c(k) = 13*c(k-1) - c(k-2). a(13) = 3 because c(3) = 2003 is the smallest prime in c(k).
		

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [1..85] do if n in [1, 2, 34, 52] then Append(~lst, -1); else a:=1; c:=1; t:=0; repeat b:=n*a-c; c:=a; a:=b; t+:=1; until IsPrime(a); Append(~lst, t); end if; end for; lst;
  • 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]]; Table[SelectFirst[Range[120], PrimeQ@ Abs@ s[#, -n] &] /. k_ /; MissingQ@ k -> -1, {n, 85}] (* Michael De Vlieger, Feb 03 2018 *)

Formula

If n is prime then a(n+1) = 1.
Previous Showing 11-16 of 16 results.