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 21-30 of 30 results.

A249446 Numbers n such that 2*(n^2-1) - 1 and 2*(n^2-1) + 1 are primes.

Original entry on oeis.org

2, 4, 10, 11, 34, 41, 46, 49, 56, 59, 76, 85, 95, 125, 160, 181, 185, 196, 200, 206, 220, 245, 266, 280, 295, 301, 304, 346, 365, 379, 386, 391, 440, 470, 505, 556, 571, 595, 659, 679, 689, 731, 784, 815, 820, 854, 869, 896, 944, 959, 994, 1001, 1004, 1015, 1025, 1154, 1250, 1345, 1376
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 29 2014

Keywords

Comments

Subsequence of A066049. - Michel Marcus, Oct 29 2014
n such that 2*n^2 - 2 is in A014574. - Robert Israel, Nov 18 2014

Examples

			2 is in this sequence because 2*(2^2-1) - 1 = 5 and 2*(2^2-1) + 1 = 7 are both prime.
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..1400] | IsPrime(2*(n^2-1)-1) and IsPrime(2*(n^2-1)+1) ];
    
  • Maple
    select(n -> isprime(2*n^2-3) and isprime(2*n^2-1), [$1 .. 10000]); # Robert Israel, Nov 18 2014
  • Mathematica
    Select[Range[0, 1500], PrimeQ[2 #^2 - 3] && PrimeQ[2 #^2 - 1] &] (* Vincenzo Librandi, Oct 29 2014 *)
  • PARI
    isok(n) = isprime(2*(n^2-1) - 1) && isprime(2*(n^2-1) + 1); \\ Michel Marcus, Oct 31 2014

A225098 Numbers k such that k^2 - 2 and 2*k^2 - 1 are both prime.

Original entry on oeis.org

2, 3, 7, 13, 15, 21, 43, 49, 63, 69, 127, 155, 183, 211, 231, 237, 259, 265, 273, 293, 301, 323, 335, 391, 435, 441, 447, 489, 505, 573, 595, 671, 713, 715, 743, 757, 797, 811, 951, 959, 973, 979, 987, 993, 1035, 1147, 1197, 1287, 1359, 1393, 1415, 1429, 1443, 1491, 1525, 1597, 1617, 1653
Offset: 1

Views

Author

Gerasimov Sergey, Apr 27 2013

Keywords

Comments

Primes in the sequence: 2, 3, 7, 13, 43, 127, 211, 293, 743, 757, 797, 811, 1429,...

Examples

			2^2 - 2 = 2 is prime and 2*2^2 - 1 = 7 is prime, so a(1) = 2.
		

Crossrefs

Intersection of A028870 and A066049.

Programs

  • Mathematica
    Select[Range[1653], PrimeQ[#^2 - 2] && PrimeQ[2*#^2 - 1] &] (* T. D. Noe, May 10 2013 *)

Extensions

Corrected by R. J. Mathar, May 05 2013

A230362 Least prime p with 2*p^2 - 1 and 2*(n-p)^2 -1 both prime, or 0 if such a prime p does not exist.

Original entry on oeis.org

3, 13, 7, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 7, 2, 2, 3, 2, 2, 3, 7, 2, 3, 7, 11, 13, 7, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 7, 2, 2, 3, 2, 3, 7, 7, 2, 3, 11, 2, 3, 7, 2, 2, 2, 3, 43, 7, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 16 2013

Keywords

Comments

Conjecture: 0 < a(n) < sqrt(2n)*(log n) except for n = 1, 2, 3, 232, 1478, 6457.
By the conjecture in the comments in A230351, 0 < a(n) < n for all n > 3.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023

Examples

			a(12) = 2 since 2*2^2 - 1 and 2*(12-2)^2 - 1 = 199 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[2Prime[i]^2-1]&&PrimeQ[2(n-Prime[i])^2-1],Print[n," ",Prime[i]];Goto[aa]],{i,1,Max[13,PrimePi[n-1]]}];
    Print[n," ",counterexample];Label[aa];Continue,{n,1,70}]

A239938 a(n) = least number k > 0 such that n*k^n - 1 is prime, or 0 if no such k exists.

Original entry on oeis.org

3, 2, 1, 1, 4, 1, 8, 1, 40, 3, 10, 1, 56, 1, 10, 0, 46, 1, 6, 1, 42, 51, 4, 1, 8, 67, 0, 18, 102, 1, 98, 1, 38, 6, 136, 0, 90, 1, 10, 3, 52, 1, 12, 1, 18, 3, 28, 1, 72, 165, 40, 657, 418, 1, 44, 205, 94, 9, 426, 1, 482, 1, 4, 0, 418, 252, 38, 1, 400, 165, 28, 1, 140
Offset: 1

Views

Author

Derek Orr, Mar 29 2014

Keywords

Comments

a(n) = 1 iff n-1 is prime.
If a(n) = 0 then n is in A097764. Note the converse is not true: a(4) = 1, not 0.
Up to a(1000), the largest term is a(456) = 947310. The PFGW program has been used to certify all the terms up to a(1000), using the 'N+1' deterministic test. - Giovanni Resta, Mar 30 2014

Examples

			1*1^1 - 1 = 0 is not prime. 1*2^1 - 1 = 1 is not prime. 1*3^1 - 1 = 2 is prime. Thus a(1) = 3.
		

Crossrefs

Programs

  • Mathematica
    nope[n_] := n > 4 && Catch@Block[{p = 2}, While[n >= p^p, If[ IntegerQ[ n^(1/p)/p], Throw@ True]; p = NextPrime@ p]; False]; a[n_] := If[nope@ n, 0, Block[{k = 1}, While[! PrimeQ[n*k^n - 1], k++]; k]]; Array[a, 80] (* Giovanni Resta, Mar 30 2014 *)
    A239938[n_] := If[n != 4 && # != 1 && GCD[n, #] != 1 &[GCD @@ FactorInteger[n][[All, -1]]], 0, NestWhile[# + 1 &, 1, Not@PrimeQ[n #^n - 1] &]]; Array[A239938, 73] (* JungHwan Min, Dec 28 2015 *)
  • PARI
    Pro(n) = for(k=1,10^4,if(ispseudoprime(n*k^n-1),return(k)));
    n=1; while(n<100,print1(Pro(n), ", ");n+=1)

A143834 Numbers k such that 2k^2 - 1 is not prime.

Original entry on oeis.org

1, 5, 9, 12, 14, 16, 19, 20, 23, 26, 27, 29, 30, 31, 32, 33, 35, 37, 40, 44, 47, 48, 51, 53, 54, 55, 57, 58, 60, 61, 65, 66, 67, 68, 70, 71, 72, 74, 75, 77, 78, 79, 82, 83, 84, 86, 88, 89, 90, 93, 94, 96, 97, 99, 100, 101, 103, 104, 105, 106, 107, 110, 111, 114, 116, 117
Offset: 1

Views

Author

Artur Jasinski, Sep 02 2008

Keywords

Comments

Complement of A066049.

Crossrefs

Programs

  • Magma
    [n: n in [1..120]| not IsPrime(2*n^2-1)] // Vincenzo Librandi, Jan 28 2011
  • Mathematica
    p = 2; a = {}; Do[k = p x^2 - 1; If[PrimeQ[k],NULL, AppendTo[a, x]], {x, 1, 1000}]; a
    Select[Range[120],!PrimeQ[2#^2-1]&] (* Harvey P. Dale, Mar 14 2018 *)

A209494 Smallest prime p such that 2p*n^2 - 1 is prime, or 0 if no such prime exists.

Original entry on oeis.org

2, 3, 3, 7, 3, 5, 3, 3, 5, 3, 7, 3, 3, 37, 13, 7, 3, 11, 31, 3, 5, 3, 19, 11, 13, 7, 3, 3, 19, 3, 31, 3, 5, 7, 3, 5, 13, 3, 11, 37, 61, 13, 3, 7, 3, 19, 73, 5, 7, 19, 11, 3, 31, 7, 3, 31, 31, 3, 7, 3, 19, 3, 3, 31, 3, 19, 151, 3, 5, 3, 7, 5, 3, 97
Offset: 1

Views

Author

Gerasimov Sergey, Mar 09 2012

Keywords

Examples

			2 is in the sequence because 2 and 2*2*1^2 - 1 = 3 are both primes.
		

Crossrefs

Cf. A066049.

Programs

  • Mathematica
    spp[n_]:=Module[{n2=n^2,p=2},While[!PrimeQ[2p*n2-1],p=NextPrime[p]];p]; Array[spp,80] (* Harvey P. Dale, Jul 09 2017 *)
  • PARI
    a(n)=forprime(p=2,default(primelimit),if(isprime(2*p*n^2-1),return(p))) \\ Charles R Greathouse IV, Mar 09 2012

A230546 Least positive integer k <= n such that 2*k^2-1 is a prime and n - k is a square, or 0 if such an integer k does not exist.

Original entry on oeis.org

0, 2, 2, 3, 4, 2, 3, 4, 8, 6, 2, 3, 4, 10, 6, 7, 8, 2, 3, 4, 17, 6, 7, 8, 21, 10, 2, 3, 4, 21, 6, 7, 8, 18, 10, 11, 21, 2, 3, 4, 25, 6, 7, 8, 36, 10, 11, 39, 13, 25, 2, 3, 4, 18, 6, 7, 8, 22, 10, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 23 2013

Keywords

Comments

By the conjecture in A230494, we should have a(n) > 0 for all n > 1.

Examples

			a(4) = 3 since neither 4 - 1 = 3 nor 4 - 2 = 2 is a square, but 4 - 3 = 1 is a square and 2*3^2 - 1 = 17 is a prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[Do[If[PrimeQ[2k^2-1]&&SQ[n-k],Print[n," ",k];Goto[aa]],{k,1,n}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]
    lpik[n_]:=Module[{k=1},While[!PrimeQ[2k^2-1]||!IntegerQ[Sqrt[n-k]],k++];k]; Join[{0},Array[lpik,60,2]] (* Harvey P. Dale, Aug 04 2021 *)

A293190 a(n) = |{A001597(n) <= k <= A001597(n+1): 2*k^2-1 is prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 01 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0. In other words, for any perfect powers x^m and y^n with 0 < x^m < y^n, there is an integer z with x^m <= z <= y^n such that 2*z^2 - 1 is prime.
(ii) For any perfect powers x^m and y^n with 0 < x^m < y^n, there is an integer z with x^m <= z <= y^n such that 2*z + 3 (or 20*z^2 + 3) is prime.
(iii) For perfect powers x^m and y^n with 0 < x^m < y^n, there is a practical number q (cf. A005153) with x^m <= q <= y^n, unless x^m = 5^2 and y^n = 3^3, or x^m = 11^2 and y^n = 5^3, or x^m = 22434^2 and y^n = 55^5.
Compare this with the Redmond-Sun conjecture.

Examples

			a(1) = 3 since 2*2^2 - 1, 2*3^2-1 and 2*4^2-1 are all prime but 2*1^2 - 1 is not prime.
a(3) = 1 since A001597(3) = 8, A001597(4) = 9, 2*8^2 - 1 = 127 is prime but 2*9^2 - 1 is composite.
a(6) = 1 since A001597(6) = 25, A001597(7) = 27, 2*25^2 - 1 = 1249 is prime but 2*26^2 - 1 and 2*27^2 - 1 are composite.
a(14) = 1 since A001597(14) = 121, A001597(15) = 125, 2*125^2
- 1 = 31249 is prime but 2*k^2 - 1 is composite for every k = 121, 122, 123, 124.
a(361) = 1 since A001597(361) = 46^3 = 97336, A001597(362) = 312^2 = 97344, and k = 97342 is the only number among 97336,...,97344 with 2*k^2 - 1 prime.
		

Crossrefs

Programs

  • Mathematica
    n=1;m=1;Do[Do[If[IntegerQ[k^(1/Prime[i])],Print[n," ",Sum[Boole[PrimeQ[2j^2-1]],{j,m,k}]];n=n+1;m=k;Goto[aa]],{i,1,PrimePi[Log[2,k]]}];Label[aa],{k,2,6561}]

A066479 a(n) = min( x : x^3+n^3+x^2+n^2+x+n=1 mod(x+n)).

Original entry on oeis.org

5, 14, 27, 2, 65, 90, 119, 14, 189, 230, 29, 324, 3, 434, 57, 560, 629, 84, 27, 860, 945, 128, 1127, 1224, 167, 4, 1539, 12, 227, 82, 57, 278, 2277, 44, 2555, 82, 2849, 3002, 417, 3320, 3485, 3654, 5, 4004, 4185, 584, 223, 4752, 4949, 692, 5355, 84, 65, 208, 6215
Offset: 2

Views

Author

Benoit Cloitre, Jan 02 2002

Keywords

Comments

It appears that a(n) = A014106(n-1) for n in A066049. - Michel Marcus, Feb 17 2021

Crossrefs

Programs

  • PARI
    a(n) = my(x=0); while(Mod(x^3+n^3+x^2+n^2+x+n, x+n) != 1, x++); x; \\ Michel Marcus, Feb 17 2021

Formula

a(n) = A014106(n) for n=2, 3, 4, 6, 7, 8, 10, 11, 13, 15, 17, 18, 21, 22, 24, 25, 28, 34, 36, 38, 39.

Extensions

More terms from Michel Marcus, Feb 17 2021

A173416 Exactly one of 2n^2-1 and 2n^2+1 is prime.

Original entry on oeis.org

1, 2, 4, 7, 8, 9, 10, 11, 13, 15, 17, 18, 22, 25, 27, 28, 30, 33, 34, 38, 39, 41, 43, 46, 49, 50, 52, 56, 59, 62, 63, 64, 66, 69, 72, 73, 75, 76, 80, 81, 85, 91, 92, 93, 95, 96, 98, 99, 105, 108, 109, 112, 113, 115, 118, 123, 125, 126, 127, 134, 135, 137, 140, 141, 143
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 01 2010

Keywords

Comments

Numbers in A089001 or in A066049 but not in both. [From R. J. Mathar, Mar 09 2010]

Examples

			a(1)=1 because 2*1^2-1=1 is nonprime and 2*1^2+1=3 is prime.
		

Extensions

37 removed by R. J. Mathar, Mar 09 2010
Previous Showing 21-30 of 30 results.