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-20 of 38 results. Next

A268043 Numbers k such that k^3 - 1 and k^3 + 1 are both semiprimes.

Original entry on oeis.org

6, 1092, 1932, 2730, 4158, 6552, 11172, 25998, 30492, 55440, 76650, 79632, 85092, 102102, 150990, 152082, 152418, 166782, 211218, 235662, 236208, 248640, 264600, 298410, 300300, 301182, 317772, 380310, 387198, 441798, 476028, 488418
Offset: 1

Views

Author

Vincenzo Librandi, Jan 25 2016

Keywords

Comments

Obviously, k+1 and k-1 are always prime numbers.
If k is a term then m = (k - 1) * (k^2 + k + 1) is a term of A169635, i.e., A001157(m) = A001157(m+2) (De Koninck, 2002). - Amiram Eldar, Apr 19 2024

Examples

			a(1) = 6 because 6^3-1 = 215 = 5*43 and 6^3+1 = 217 = 7*31, therefore 215, 217 are both semiprimes.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [2..300000] | IsSemiprime(n^3+1) and IsSemiprime(n^3-1) ];
    
  • Mathematica
    Select[Range[500000], PrimeOmega[#^3 - 1] == PrimeOmega[#^3 + 1] == 2 &]
    Select[Range[10^6], And @@ PrimeQ[{# - 1, # + 1, #^2 - # + 1, #^2 + # + 1}] &] (* Amiram Eldar, Apr 19 2024 *)
  • PARI
    isok(n) = (bigomega(n^3-1) == 2) && (bigomega(n^3+1) == 2); \\ Michel Marcus, Jan 26 2016
    
  • PARI
    is(n) = isprime(n - 1) && isprime(n + 1) && isprime(n^2 - n + 1) && isprime(n^2 + n + 1); \\ Amiram Eldar, Apr 19 2024

A250177 Numbers n such that Phi_21(n) is prime, where Phi is the cyclotomic polynomial.

Original entry on oeis.org

3, 6, 7, 12, 22, 27, 28, 35, 41, 59, 63, 69, 112, 127, 132, 133, 136, 140, 164, 166, 202, 215, 218, 276, 288, 307, 323, 334, 343, 377, 383, 433, 474, 479, 516, 519, 521, 532, 538, 549, 575, 586, 622, 647, 675, 680, 692, 733, 790, 815, 822, 902, 909, 911, 915, 952, 966, 1025, 1034, 1048, 1093
Offset: 1

Views

Author

Eric Chen, Dec 24 2014

Keywords

Crossrefs

Cf. A008864 (1), A006093 (2), A002384 (3), A005574 (4), A049409 (5), A055494 (6), A100330 (7), A000068 (8), A153439 (9), A250392 (10), A162862 (11), A246397 (12), A217070 (13), A250174 (14), A250175 (15), A006314 (16), A217071 (17), A164989 (18), A217072 (19), A250176 (20), this sequence (21), A250178 (22), A217073 (23), A250179 (24), A250180 (25), A250181 (26), A153440 (27), A250182 (28), A217074 (29), A250183 (30), A217075 (31), A006313 (32), A250184 (33), A250185 (34), A250186 (35), A097475 (36), A217076 (37), A250187 (38), A250188 (39), A250189 (40), A217077 (41), A250190 (42), A217078 (43), A250191 (44), A250192 (45), A250193 (46), A217079 (47), A250194 (48), A250195 (49), A250196 (50), A217080 (53), A217081 (59), A217082 (61), A006315 (64), A217083 (67), A217084 (71), A217085 (73), A217086 (79), A153441 (81), A217087 (83), A217088 (89), A217089 (97), A006316 (128), A153442 (243), A056994 (256), A056995 (512), A057465 (1024), A057002 (2048), A088361 (4096), A088362 (8192), A226528 (16384), A226529 (32768), A226530 (65536), A251597 (131072), A244150 (524287), A243959 (1048576).
Cf. A085398 (Least k>1 such that Phi_n(k) is prime).

Programs

  • Mathematica
    a250177[n_] := Select[Range[n], PrimeQ@Cyclotomic[21, #] &]; a250177[1100] (* Michael De Vlieger, Dec 25 2014 *)
  • PARI
    {is(n)=isprime(polcyclo(21,n))};
    for(n=1,100, if(is(n)==1, print1(n, ", "), 0)) \\ G. C. Greubel, Apr 14 2018

A131530 Numbers k such that k^2 - k - 1 and k^2 - k + 1 are twin primes.

Original entry on oeis.org

3, 4, 6, 7, 9, 16, 21, 22, 25, 39, 42, 51, 55, 60, 67, 90, 102, 132, 139, 142, 154, 156, 165, 177, 189, 204, 207, 210, 216, 219, 232, 237, 247, 289, 291, 310, 315, 352, 379, 396, 406, 454, 456, 457, 496, 501, 519, 531, 552, 561, 625, 645, 669, 687, 721, 729, 744
Offset: 1

Views

Author

Pierre CAMI, Aug 26 2007

Keywords

Crossrefs

Intersection of A002328 and A055494. - Michel Marcus, Jan 24 2018

Programs

  • Magma
    [n: n in [0..500] | IsPrime(n^2-n-1) and IsPrime(n^2-n+1)]; // Vincenzo Librandi, Nov 23 2010
  • Mathematica
    Select[Range[744],AllTrue[{#^2-#-1,#^2-#+1},PrimeQ]&] (* James C. McMahon, Feb 25 2025 *)

A239115 Numbers n such that (n-1)*n^2-1 and n^2-(n-1) are both prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 13, 18, 21, 22, 58, 67, 79, 90, 100, 106, 111, 118, 120, 144, 162, 174, 195, 204, 246, 273, 279, 345, 393, 403, 406, 435, 436, 526, 541, 567, 613, 625, 636, 702, 721, 729, 736, 744, 762, 763, 865, 898, 961, 970, 993, 1059, 1099, 1117, 1131
Offset: 1

Views

Author

Ilya Lopatin following a suggestion from Juri-Stepan Gerasimov, Mar 10 2014,

Keywords

Comments

Numbers n such that (n^3-n^2-1)*(n^2-n+1) is semiprime.
Intersection of A162293 and A055494.
Primes in this sequence: 2, 3, 7, 13, 67, 79, 541, 613, 1117, ...
Squares in this sequence: 4, 9, 100, 144, 961, ...

Examples

			13 is in this sequence because (13-1)*13^2-1 = 2027 and 13^2-(13-1) = 157 are both prime.
		

Crossrefs

Programs

  • Magma
    k:=1;
        for n in [1..1000] do
         if IsPrime(k*(n-1)*n^2-1) and IsPrime(k*n^2-n+1) then
                n;
          end if;
        end for; // Juri-Stepan Gerasimov, Mar 18 2014
  • Mathematica
    Select[Range[1000], PrimeQ[#^3 - #^2 - 1] && PrimeQ[#^2 - # + 1] &] (* Giovanni Resta, Mar 10 2014 *)
    Select[Range[1200],PrimeOmega[#^5-2#^4+2#^3-2#^2+#-1]==2&] (* Harvey P. Dale, Sep 24 2014 *)
  • PARI
    isok(n) = isprime(n^3-n^2-1) && isprime(n^2-n+1); \\ Michel Marcus, Mar 10 2014
    

Extensions

More terms from Giovanni Resta, Mar 10 2014

A250175 Numbers n such that Phi_15(n) is prime, where Phi is the cyclotomic polynomial.

Original entry on oeis.org

2, 3, 11, 17, 23, 43, 46, 52, 53, 61, 62, 78, 84, 88, 89, 92, 99, 108, 123, 124, 141, 146, 154, 156, 158, 163, 170, 171, 182, 187, 202, 217, 219, 221, 229, 233, 238, 248, 249, 253, 264, 274, 275, 278, 283, 285, 287, 291, 296, 302, 309, 314, 315, 322, 325, 342, 346, 353, 356, 366, 368, 372, 377, 380, 384, 394, 404, 406, 411, 420, 425
Offset: 1

Views

Author

Eric Chen, Dec 24 2014

Keywords

Crossrefs

Cf. A008864 (1), A006093 (2), A002384 (3), A005574 (4), A049409 (5), A055494(6), A100330 (7), A000068 (8), A153439 (9), A246392 (10), A162862(11), A246397 (12), A217070 (13), A006314 (16), A217071 (17), A164989(18), A217072 (19), A217073 (23), A153440 (27), A217074 (29), A217075(31), A006313 (32), A097475 (36), A217076 (37), A217077 (41), A217078(43), A217079 (47), A217080 (53), A217081 (59), A217082 (61), A006315(64), A217083 (67), A217084 (71), A217085 (73), A217086 (79), A153441(81), A217087 (83), A217088 (89), A217089 (97), A006316 (128), A153442(243), A056994 (256), A056995 (512), A057465 (1024), A057002 (2048), A088361 (4096), A088362 (8192), A226528 (16384), A226529 (32768), A226530(65536).

Programs

  • Mathematica
    Select[Range[600], PrimeQ[Cyclotomic[15, #]] &] (* Vincenzo Librandi, Jan 16 2015 *)
  • PARI
    isok(n) = isprime(polcyclo(15, n)); \\ Michel Marcus, Jan 16 2015

Extensions

More terms from Vincenzo Librandi, Jan 16 2015

A250176 Numbers n such that Phi_20(n) is prime, where Phi is the cyclotomic polynomial.

Original entry on oeis.org

4, 9, 11, 16, 19, 26, 34, 45, 54, 70, 86, 91, 96, 101, 105, 109, 110, 119, 120, 126, 129, 139, 141, 149, 171, 181, 190, 195, 215, 229, 260, 276, 299, 305, 309, 311, 314, 319, 334, 339, 369, 375, 414, 420, 425, 444, 470, 479, 485, 506, 519, 534, 540, 550
Offset: 1

Views

Author

Eric Chen, Dec 24 2014

Keywords

Crossrefs

Cf. A008864 (1), A006093 (2), A002384 (3), A005574 (4), A049409 (5), A055494(6), A100330 (7), A000068 (8), A153439 (9), A246392 (10), A162862(11), A246397 (12), A217070 (13), A006314 (16), A217071 (17), A164989(18), A217072 (19), A217073 (23), A153440 (27), A217074 (29), A217075(31), A006313 (32), A097475 (36), A217076 (37), A217077 (41), A217078(43), A217079 (47), A217080 (53), A217081 (59), A217082 (61), A006315(64), A217083 (67), A217084 (71), A217085 (73), A217086 (79), A153441(81), A217087 (83), A217088 (89), A217089 (97), A006316 (128), A153442(243), A056994 (256), A056995 (512), A057465 (1024), A057002 (2048), A088361 (4096), A088362 (8192), A226528 (16384), A226529 (32768), A226530(65536).

Programs

  • Mathematica
    Select[Range[600], PrimeQ[Cyclotomic[20, #]] &] (* Vincenzo Librandi, Jan 16 2015 *)
  • PARI
    isok(n) = isprime(polcyclo(20, n)); \\ Michel Marcus, Sep 29 2015

Extensions

More terms from Vincenzo Librandi, Jan 16 2015

A253240 Square array read by antidiagonals: T(m, n) = Phi_m(n), the m-th cyclotomic polynomial at x=n.

Original entry on oeis.org

1, 1, -1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 3, 3, 1, 1, 3, 4, 7, 2, 1, 1, 4, 5, 13, 5, 5, 1, 1, 5, 6, 21, 10, 31, 1, 1, 1, 6, 7, 31, 17, 121, 3, 7, 1, 1, 7, 8, 43, 26, 341, 7, 127, 2, 1, 1, 8, 9, 57, 37, 781, 13, 1093, 17, 3, 1, 1, 9, 10, 73, 50, 1555, 21, 5461, 82, 73, 1, 1, 1, 10, 11, 91, 65, 2801, 31, 19531, 257, 757, 11, 11, 1, 1, 11, 12, 111, 82, 4681, 43, 55987, 626, 4161, 61, 2047, 1, 1
Offset: 0

Views

Author

Eric Chen, Apr 22 2015

Keywords

Comments

Outside of rows 0, 1, 2 and columns 0, 1, only terms of A206942 occur.
Conjecture: There are infinitely many primes in every row (except row 0) and every column (except column 0), the indices of the first prime in n-th row and n-th column are listed in A117544 and A117545. (See A206864 for all the primes apart from row 0, 1, 2 and column 0, 1.)
Another conjecture: Except row 0, 1, 2 and column 0, 1, the only perfect powers in this table are 121 (=Phi_5(3)) and 343 (=Phi_3(18)=Phi_6(19)).

Examples

			Read by antidiagonals:
m\n  0   1   2   3   4   5   6   7   8   9  10  11  12
------------------------------------------------------
0    1   1   1   1   1   1   1   1   1   1   1   1   1
1   -1   0   1   2   3   4   5   6   7   8   9  10  11
2    1   2   3   4   5   6   7   8   9  10  11  12  13
3    1   3   7  13  21  31  43  57  73  91 111 133 157
4    1   2   5  10  17  26  37  50  65  82 101 122 145
5    1   5  31 121 341 781 ... ... ... ... ... ... ...
6    1   1   3   7  13  21  31  43  57  73  91 111 133
etc.
The cyclotomic polynomials are:
n        n-th cyclotomic polynomial
0        1
1        x-1
2        x+1
3        x^2+x+1
4        x^2+1
5        x^4+x^3+x^2+x+1
6        x^2-x+1
...
		

Crossrefs

Main diagonal is A070518.
Indices of primes in n-th column for n = 1-10 are A246655, A072226, A138933, A138934, A138935, A138936, A138937, A138938, A138939, A138940.
Indices of primes in main diagonal is A070519.
Cf. A117544 (indices of first prime in n-th row), A085398 (indices of first prime in n-th row apart from column 1), A117545 (indices of first prime in n-th column).
Cf. A206942 (all terms (sorted) for rows>2 and columns>1).
Cf. A206864 (all primes (sorted) for rows>2 and columns>1).

Programs

  • Mathematica
    Table[Cyclotomic[m, k-m], {k, 0, 49}, {m, 0, k}]
  • PARI
    t1(n)=n-binomial(floor(1/2+sqrt(2+2*n)), 2)
    t2(n)=binomial(floor(3/2+sqrt(2+2*n)), 2)-(n+1)
    T(m, n) = if(m==0, 1, polcyclo(m, n))
    a(n) = T(t1(n), t2(n))

Formula

T(m, n) = Phi_m(n)

A236056 Numbers k such that k^2 +- k +- 1 is prime for all four possibilities.

Original entry on oeis.org

3, 6, 21, 456, 1365, 2205, 2451, 2730, 8541, 18486, 32199, 32319, 32781, 45864, 61215, 72555, 72561, 82146, 83259, 86604, 91371, 95199, 125334, 149331, 176889, 182910, 185535, 210846, 225666, 226254, 288420, 343161, 350091, 403941, 411501, 510399, 567204
Offset: 1

Views

Author

Derek Orr, Jan 18 2014

Keywords

Comments

The only prime in this sequence is a(1) = 3.

Examples

			1365^2 + 1365 + 1 = 1864591,
1365^2 + 1365 - 1 = 1864589,
1365^2 - 1365 + 1 = 1861861, and
1365^2 - 1365 - 1 = 1861859 are all prime, so 1365 is a term of this sequence.
		

Crossrefs

Numbers in the intersection of A002384, A045546, A055494, and A002328.
Numbers in the intersection of A131530 and A088485.

Programs

  • Maple
    q:= k-> andmap(isprime, [seq(seq(k^2+i+j, j=[k, -k]), i=[1, -1])]):
    select(q, [3*t$t=1..200000])[];  # Alois P. Heinz, Feb 25 2020
  • Mathematica
    Select[Range[568000],AllTrue[Flatten[{#^2+#+{1,-1},#^2-#+{1,-1}},1],PrimeQ]&] (* Harvey P. Dale, Jul 31 2022 *)
  • Python
    import sympy
    from sympy import isprime
    {print(p) for p in range(10**6) if isprime(p**2+p+1) and isprime(p**2-p+1) and isprime(p**2+p-1) and isprime(p**2-p-1)}

A260559 Numbers k such that (k^31+1)/(k+1) is prime.

Original entry on oeis.org

2, 6, 10, 36, 65, 74, 78, 83, 106, 115, 120, 148, 161, 163, 168, 176, 189, 194, 197, 266, 270, 288, 331, 385, 399, 407, 410, 412, 413, 431, 468, 513, 524, 546, 569, 572, 578, 581, 600, 611, 625, 626, 647, 719, 723, 756, 832, 834, 849, 922, 986, 1006, 1007, 1047
Offset: 1

Views

Author

Tim Johannes Ohrtmann, Jul 29 2015

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..10000] |IsPrime((n^31 + 1) div (n + 1))];
  • Mathematica
    Select[Range[1, 10000], PrimeQ[(#^31 + 1)/(# + 1)] &]
  • PARI
    for(n=1,10000, if(isprime((n^31+1)/(n+1)), print1(n,", ")))
    

A260560 Numbers n such that (n^37+1)/(n+1) is prime.

Original entry on oeis.org

16, 19, 21, 49, 56, 63, 71, 74, 77, 83, 92, 96, 99, 160, 172, 197, 198, 230, 241, 280, 283, 415, 425, 448, 490, 520, 627, 691, 735, 784, 803, 829, 842, 853, 871, 872, 893, 894, 973, 981, 989, 1043, 1060, 1061, 1071, 1179, 1182, 1203, 1290, 1299, 1317, 1370, 1389
Offset: 1

Views

Author

Tim Johannes Ohrtmann, Jul 29 2015

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..10000] |IsPrime((n^37 + 1) div (n + 1))]
  • Mathematica
    Select[Range[1, 10000], PrimeQ[(#^37 + 1)/(# + 1)] &]
  • PARI
    for(n=1,10000, if(isprime((n^37+1)/(n+1)), print1(n,", ")))
    
Previous Showing 11-20 of 38 results. Next