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

A165352 Primes of the form p + (p^2 - 1)/8, where p is also prime.

Original entry on oeis.org

13, 53, 89, 151, 251, 701, 739, 859, 1429, 1709, 2143, 3001, 4751, 7019, 8513, 10151, 12401, 14533, 17203, 18719, 21319, 23869, 27259, 30133, 41039, 42193, 44549, 45751, 46663, 52973, 82619, 99233, 104651, 114479, 120293, 135979, 138599, 148783, 151523
Offset: 1

Views

Author

Vincenzo Librandi, Sep 16 2009

Keywords

Comments

Primes of the form k+(k^2-1)/8, where k >0 are prime or composite, are the superset 13, 19, 43, 53, 89, 103 etc.

Crossrefs

Programs

  • Magma
    [a: p in PrimesInInterval(3, 1200) | IsPrime(a) where a is p + (p^2 - 1) div 8 ]; // Vincenzo Librandi, Oct 12 2012
    
  • Mathematica
    Select[Table[p + (p^2 - 1)/8, {p, Prime[Range[200]]}], PrimeQ] (* Vincenzo Librandi, Oct 12 2012 *)
  • PARI
    forprime(p=3,1e4,if(isprime(t=p^2>>3+p),print1(t", "))) \\ Charles R Greathouse IV, May 15 2013

Formula

a(n) = A165353(n)+(A165353(n)^2-1)/8.

Extensions

More terms from R. J. Mathar, Sep 21 2009

A165354 Primes p such that p+(p^2-1)/8 is an integer but not a prime number.

Original entry on oeis.org

3, 5, 11, 13, 19, 29, 37, 43, 47, 53, 59, 61, 67, 83, 89, 97, 101, 107, 109, 131, 137, 139, 149, 157, 163, 167, 173, 179, 181, 193, 197, 199, 211, 223, 227, 229, 239, 241, 251, 263, 269, 271, 277, 283, 293, 307, 313, 317, 331, 347, 349, 353, 359, 373, 379, 389
Offset: 1

Views

Author

Vincenzo Librandi, Sep 16 2009

Keywords

Comments

For p=2, p+(p^2-1)/8 is not integer; for all others, p=4k+-1, it is an integer.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500)| not IsPrime(Floor(p+(p^2-1)/8))]; // Vincenzo Librandi, Sep 12 2013
  • Mathematica
    Select[Prime[Range[2, 500]], ! PrimeQ[(#^2 - 1) / 8 + #]&] (* Vincenzo Librandi, Sep 12 2013 *)

Formula

A000040 \ {{2} U A165353}. - R. J. Mathar, Sep 21 2009

Extensions

Entries checked by R. J. Mathar, Sep 21 2009

A165356 Primes p such that p + (p^2 - 1)/8 is a perfect square.

Original entry on oeis.org

3, 19, 211, 1249, 4513, 1445953, 30381331, 286292179, 2959257735801707821729
Offset: 1

Views

Author

Vincenzo Librandi, Sep 16 2009

Keywords

Comments

The primes p = A000040(j) at j= 2, 8, 47, 204, 612, 110340 etc. generating the squares 2^2, 8^2, 76^2, 443^2 etc.
From the ansatz p + (p^2 - 1)/8 = s^2 we conclude p = -4 + sqrt(17 + 8*s^2), so all s are members of A077241.

Examples

			For p=3, p + (p^2-1)/8 = 4 = 2^2. For p=19, p + (p^2-1)/8 = 64 = 8^2. For p=211, p + (p^2-1)/8 = 5776 = 76^2.
		

Crossrefs

Programs

  • Maple
    A077241 := proc(n) if n <= 3 then op(n+1,[1,2,8,13]) ; else 6*procname(n-2)-procname(n-4) ; fi; end:
    for n from 0 do s := A077241(n) ; p := sqrt(17+8*s^2)-4 ; if isprime(p) then printf("%d,\n",p) ; fi; od: # R. J. Mathar, Sep 21 2009
    a := proc (n) if isprime(n) = true and type(sqrt(n+(1/8)*n^2-1/8), integer) = true then n else end if end proc; seq(a(n), n = 1 .. 10000000); # Emeric Deutsch, Sep 21 2009
  • Mathematica
    p = 2; lst = {}; While[p < 10^12, If[ IntegerQ@ Sqrt[p + (p^2 - 1)/8], AppendTo[lst, p]; Print@p]; p = NextPrime@p] (* Robert G. Wilson v, Sep 30 2009 *)

Extensions

6 more terms from R. J. Mathar, Sep 21 2009
Showing 1-3 of 3 results.