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

A283562 Primes of the form (p^2 - q^2) / 24 with primes p > q > 3.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 37, 43, 47, 53, 67, 73, 97, 103, 107, 113, 127, 137, 157, 163, 167, 173, 193, 223, 233, 257, 263, 277, 283, 293, 313, 337, 347, 353, 373, 397, 433, 443, 467, 487, 523, 547, 563, 577, 593, 607, 613, 617, 643, 647, 653, 733, 743, 757, 773, 787, 797, 887, 907, 937, 947, 953, 977
Offset: 1

Views

Author

Altug Alkan and Thomas Ordowski, Mar 11 2017

Keywords

Comments

Note that p - q must be <= 12. Also note that there can be corresponding prime pairs (q, p) more than one way, i.e., (7, 13), (13, 17), (29, 31): (13^2 - 7^2)/24 = (17^2 - 13^2)/24 = (31^2 - 29^2)/24 = 5.
There are no terms of A045468 > 11.
Union of {2}, A006489, A060212, A092110, and A125272. - Robert Israel, Mar 13 2017

Examples

			3 is a term since (11^2 - 7^2)/24 = 3 and 3, 7, 11 are prime numbers.
		

Crossrefs

Programs

  • Maple
    select(r -> isprime(r) and ((isprime(3*r+2) and isprime(3*r-2))
      or (isprime(6*r+1) and isprime(6*r-1))
      or (isprime(2*r+3) and isprime(2*r-3))
    or (isprime(r+6) and isprime(r-6))), [2,seq(i,i=3..1000,2)]); # Robert Israel, Mar 13 2017
  • Mathematica
    ok[n_] := PrimeQ[n] && Block[{p, q, s = Reduce[p^2-q^2 == 24 n && p>3 && q>3, {p, q}, Integers]}, If[s === {}, False, Or @@ And @@@ PrimeQ[{p, q} /. List@ ToRules@s]]]; Select[Range@1000, ok] (* Giovanni Resta, Mar 11 2017 *)
  • PARI
    isA124865(n) = if(n%24, isprimepower(n+4)==2 || isprimepower(n+9)==2, fordiv(n/4, d, if(isprime(n/d/4+d) && isprime(n/d/4-d), return(1))); 0)
    lista(nn) = forprime(p=2, nn, if(isA124865(24*p), print1(p", ")))

Formula

For n > 5, a(n) == {3,7} mod 10.

A124866 Numbers of the form (p^2-q^2)/8, p, q odd primes, p>q.

Original entry on oeis.org

2, 3, 5, 6, 9, 12, 14, 15, 18, 20, 21, 24, 30, 33, 35, 36, 39, 42, 44, 45, 51, 54, 60, 63, 65, 66, 69, 75, 81, 84, 90, 96, 99, 102, 104, 105, 111, 114, 117, 119, 120, 126, 129, 135, 141, 144, 150, 156, 159, 165, 168, 170, 171, 174, 180, 186, 189, 195, 201, 204, 207
Offset: 1

Views

Author

Alexander Adamchuk, Nov 10 2006

Keywords

Comments

Primes in a(n) are {2, 3, 5}.

Crossrefs

Cf. A124865 Numbers of the form p^2-q^2, p, q primes, p>q. Cf. A045636 Numbers of the form p^2+q^2, p, q primes.

Programs

  • Mathematica
    Take[Union[Flatten[Table[(Prime[p]^2 - Prime[q]^2)/8, {p, 2, 100}, {q, 2, p - 1}]]], 60] (* Alonso del Arte, Jul 14 2011 *)

A358313 Primes p such that 24*p is the difference of two squares of primes in three different ways.

Original entry on oeis.org

5, 7, 13, 17, 23, 103, 6863, 7523, 11807, 11833, 22447, 91807, 100517, 144167, 204013, 221077, 478937, 531983, 571867, 752293, 1440253, 1647383, 1715717, 1727527, 1768667, 2193707, 2381963, 2539393, 2957237, 3215783, 3290647, 3873713, 4243997, 4512223, 4880963, 4895777, 5226107, 5345317, 5540063
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 08 2022

Keywords

Comments

The positive integer solutions of 24*p = x^2 - y^2 are (x = p+6, y = p-6), (x = 2*p+3, y = 2*p - 3), (x = 3*p+2, y = 3*p-2) and (x = 6*p+1, y=6*p-1). Since at least one of these is always divisible by 7, it is impossible for 24*p to be the difference of two squares of primes in 4 different ways.
Primes p such that three of the pairs (p +- 6), (2*p +- 3), (3*p +- 2), (6*p +- 1) are pairs of primes.
Except for 5, all terms == 3 or 7 (mod 10).

Examples

			a(3) = 13 is a term because 13 is prime, 13 +- 6 = 19 and 7 are primes, 2*13 +- 3 = 29 and 23 are primes, and 3*13 +- 2 = 37 and 41 are primes.
		

Crossrefs

Cf. A124865.

Programs

  • Maple
    filter:= proc(p) local t;
      if not isprime(p) then return false fi;
      t:= 0;
      if isprime(p+6) and isprime(p-6) then t:= t+1 fi;
      if isprime(2*p+3) and isprime(2*p-3) then t:= t+1 fi;
      if isprime(3*p+2) and isprime(3*p-2) then t:= t+1 fi;
      if isprime(6*p+1) and isprime(6*p-1) then t:= t+1 fi;
      t = 3
    end proc:
    select(filter, [seq(i,i=3..10^7,2)]);

A132329 Numbers that cannot be expressed as the difference of the squares of primes.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Views

Author

Rick L. Shepherd, Aug 19 2007

Keywords

Comments

Complement of A124865.

Crossrefs

Programs

  • Mathematica
    lim=80;sp={4};i=2;Until[Prime[i]^2-(Prime[i]-2)^2>lim,AppendTo[sp,Prime[i]^2];i++];Complement[Range[lim],Union[Differences/@Subsets[sp,{2}]//Flatten]] (* James C. McMahon, Mar 08 2025 *)

A168469 Numbers of the form p^2 - q^2, p, q primes, p > q, with repetitions.

Original entry on oeis.org

5, 16, 21, 24, 40, 45, 48, 72, 72, 96, 112, 117, 120, 120, 120, 144, 160, 165, 168, 168, 168, 192, 240, 240, 240, 240, 264, 280, 285, 288, 312, 312, 312, 336, 352, 357, 360, 360, 408, 408, 408, 432, 432, 480, 480, 480, 504, 520, 525, 528, 528, 552, 552, 552
Offset: 1

Views

Author

Zak Seidov, Nov 26 2009

Keywords

Crossrefs

Cf. A124865 Numbers of the form p^2 - q^2, p, q primes, p > q.

Programs

  • Mathematica
    Take[Sort[Last[#]^2-First[#]^2&/@Subsets[Prime[Range[40]],{2}]],60] (* Harvey P. Dale, Jul 22 2012 *)
Showing 1-5 of 5 results.