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

A130056 Primes prime(n) such that both of the numbers (prime(n+2)^2-prime(n)^2)/2 - 1 and (prime(n+2)^2-prime(n)^2)/2 + 1 are primes.

Original entry on oeis.org

7, 19, 37, 61, 67, 71, 97, 107, 127, 157, 229, 349, 419, 443, 673, 743, 751, 877, 937, 947, 967, 1009, 1039, 1063, 1553, 1609, 1637, 1913, 2311, 2381, 2417, 2437, 2687, 2753, 2969, 3067, 3079, 3137, 3313, 3559, 3803, 3911, 3919, 4111, 4157, 4507, 4621
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=7 because (13^2 - 7^2)/2 - 1 = 59 and (13^2 - 7^2)/2 + 1 = 61 (59, 61 are both primes),
a(2)=19 because (29^2 - 19^2)/2 - 1 = 239 and (29^2 - 19^2)/2 + 1 = 241,
a(3)=37 because (43^2 - 37^2)/2 - 1 = 239 and (43^2 - 37^2)/2 + 1 = 241, ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p4:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+2)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+2)^(2)-ithprime(i)^(2))/2+1: if (isprime(a)=true and isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p4(2000);
  • Mathematica
    Prime/@Select[Range[700],AllTrue[(Prime[#+2]^2-Prime[#]^2)/2+{1,-1},PrimeQ]&] (* Harvey P. Dale, Nov 27 2022 *)

A130066 Primes prime(n) such that both of the numbers (prime(n+1)^2-prime(n)^2)/2 - 1 and (prime(n+1)^2-prime(n)^2)/2 + 1 are primes.

Original entry on oeis.org

5, 13, 29, 43, 103, 163, 167, 421, 547, 557, 587, 631, 659, 691, 701, 809, 823, 883, 919, 977, 1249, 1367, 1459, 1499, 1637, 1663, 1693, 1747, 1801, 1889, 1987, 2129, 2203, 2549, 2719, 3089, 3137, 3221, 3329, 3389, 3637, 3881, 4327, 4507, 4513, 4663, 4783
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=5 because (7^2 - 5^2)/2 - 1 = 11 and (7^2 - 5^2)/2 + 1 = 13 (11, 13 are both primes),
a(2)=13 because (17^2 - 13^2)/2 - 1 = 59 and (17^2 - 13^2)/2 + 1 = 61,
a(3)=29 because (31^2 - 29^2)/2 - 1 = 59 and (31^2 - 29^2)/2 + 1 = 61, ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p3_1:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if (isprime(a)=true and isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3_1(2000);
  • Mathematica
    Transpose[Select[Partition[Prime[Range[1000]],2,1],AllTrue[(#[[2]]^2- #[[1]]^2)/2+ {1,-1},PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 03 2015 *)

A130096 Primes prime(n) such that both of the numbers (prime(n+1)^2-prime(n)^2)/2 - 1 and (prime(n+1)^2-prime(n)^2)/2 + 1 are not primes.

Original entry on oeis.org

31, 47, 59, 71, 79, 83, 101, 107, 113, 127, 131, 149, 151, 157, 173, 193, 211, 223, 229, 233, 271, 311, 317, 337, 347, 349, 373, 383, 389, 401, 439, 457, 461, 467, 487, 491, 509, 521, 523, 541, 563, 569, 571, 593, 647, 653, 661, 683, 709, 727, 733, 743, 773
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=31 because (37^2 - 31^2)/2 - 1 = 203 and (37^2 - 31^2)/2 + 1 = 205 (203, 205 are not primes),
a(2)=47 because (53^2 - 47^2)/2 - 1 = 299 and (53^2 - 47^2)/2 + 1 = 301 (299, 301 are not primes),
a(3)=59 because (61^2 - 59^2)/2 - 1 = 119 and (61^2 - 59^2)/2 + 1 = 121 (119, 121 are not primes), ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p3_21:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if not (isprime(a)=true or isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3_21(500);
  • Mathematica
    Transpose[Select[Partition[Prime[Range[2,250]],2,1],PrimeQ[(#[[2]]^2- #[[1]]^2)/2+{1,-1}]=={False,False}&]][[1]] (* Harvey P. Dale, Jun 19 2014 *)
    Select[Partition[Prime[Range[2,150]],2,1],NoneTrue[(#[[2]]^2- #[[1]]^2)/ 2+{1,-1},PrimeQ]&][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2021 *)

A130097 Primes prime(n) such that at least one of the two numbers (prime(n+2)^2-prime(n)^2)/2 - 1 and (prime(n+2)^2-prime(n)^2)/2 + 1 is not prime.

Original entry on oeis.org

3, 5, 11, 13, 17, 23, 29, 31, 41, 43, 47, 53, 59, 73, 79, 83, 89, 101, 103, 109, 113, 131, 137, 139, 149, 151, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=3 because (7^2 - 3^2)/2 - 1 = 19 and (7^2 - 3^2)/2 + 1 = 21 (21 is not prime),
a(2)=5 because (11^2 - 5^2)/2 - 1 = 47 and (11^2 - 5^2)/2 + 1 = 49 (49 is not prime),
a(3)=11 because (17^2 - 11^2)/2 - 1 = 83 and (17^2 - 11^2)/2 + 1 = 85 (85 is not prime), ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p2_20:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 to n do a := (ithprime(i+2)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+2)^(2)-ithprime(i)^(2))/2+1: if not (isprime(a)=true and isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p2_20(300);

A130057 Primes prime(k) such that at least one of the two numbers (prime(k+1)^2-prime(k)^2)/2 - 1 and (prime(k+1)^2-prime(k)^2)/2 + 1 is prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 53, 61, 67, 73, 89, 97, 103, 109, 137, 139, 163, 167, 179, 181, 191, 197, 199, 227, 239, 241, 251, 257, 263, 269, 277, 281, 283, 293, 307, 313, 331, 353, 359, 367, 379, 397, 409, 419, 421, 431, 433, 443, 449, 463, 479
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=3 because (5^2 - 3^2)/2 - 1 = 7 and (5^2 - 3^2)/2 + 1 = 9 (7 is prime),
a(2)=5 because (7^2 - 5^2)/2 - 1 = 11 and (7^2 - 5^2)/2 + 1 = 13 (11 and 13 are primes),
a(3)=7 because (11^2 - 7^2)/2 - 1 = 35 and (11^2 - 7^2)/2 + 1 = 37 (37 is prime), ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p3:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if (isprime(a)=true or isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3(200);
  • Mathematica
    Select[Prime[Range[94]],PrimeQ[(NextPrime[#]^2-#^2)/2-1]||PrimeQ[(NextPrime[#]^2-#^2)/2+1]&] (* James C. McMahon, Feb 05 2025 *)

A130090 Primes prime(n) such that at least one of the two numbers (prime(n+1)^2-prime(n)^2)/2 - 1 and (prime(n+1)^2-prime(n)^2)/2 + 1 is not prime.

Original entry on oeis.org

3, 7, 11, 17, 19, 23, 31, 37, 41, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Comments

The value (prime(n+1)^2-prime(n)^2)/2 must be an integer.

Examples

			a(1)=3 because (5^2 - 3^2)/2 - 1 = 7 and (5^2 - 3^2)/2 + 1 = 9 (9 is not prime),
a(2)=7 because (11^2 - 7^2)/2 - 1 = 35 and (11^2 - 7^2)/2 + 1 = 37 (35 is not prime),
a(3)=11 because (13^2 - 11^2)/2 - 1 = 23 and (13^2 - 11^2)/2 + 1 = 25 (25 is not prime), ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p3_20:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+1)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+1)^(2)-ithprime(i)^(2))/2+1: if not (isprime(a)=true and isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p3_20(300);
  • Mathematica
    npQ[n_]:=Module[{x=(Last[n]^2-First[n]^2)/2},IntegerQ[x]&&MemberQ[ PrimeQ[ {x+1,x-1}],False]]; Transpose[Select[Partition[Prime[ Range[80]],2,1],npQ]][[1]] (* Harvey P. Dale, May 07 2011 *)

A130098 Primes prime(n) such that both of the numbers (prime(n+2)^2-prime(n)^2)/2 - 1 and (prime(n+2)^2-prime(n)^2)/2 + 1 are not primes.

Original entry on oeis.org

17, 23, 47, 73, 89, 101, 103, 109, 113, 131, 137, 151, 163, 167, 173, 193, 199, 211, 223, 233, 241, 257, 269, 271, 277, 281, 311, 313, 317, 331, 337, 359, 367, 379, 383, 389, 397, 401, 409, 421, 431, 433, 449, 457, 461, 487, 491, 503, 509, 521, 547, 557, 563
Offset: 1

Views

Author

Jani Melik, Aug 01 2007

Keywords

Examples

			a(1)=17 because (23^2 - 17^2)/2 - 1 = 119 and (23^2 - 17^2)/2 + 1 = 121 (119, 121 are not primes),
a(2)=23 because (31^2 - 23^2)/2 - 1 = 215 and (31^2 - 23^2)/2 + 1 = 217 (215, 217 are not primes),
a(3)=47 because (59^2 - 47^2)/2 - 1 = 635 and (59^2 - 47^2)/2 + 1 = 637 (635, 637 are not primes), ...
		

Crossrefs

Cf. A130761.

Programs

  • Maple
    ts_p2_21:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 to n do a := (ithprime(i+2)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+2)^(2)-ithprime(i)^(2))/2+1: if not (isprime(a)=true or isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p2_21(500);
Showing 1-7 of 7 results.