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

A036468 Number of ways to represent 2n+1 as a+b with 0 < a < b and a^2 + b^2 prime.

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 4, 4, 4, 3, 4, 8, 4, 6, 5, 4, 9, 8, 6, 9, 7, 7, 7, 5, 7, 9, 14, 8, 9, 11, 7, 17, 11, 10, 9, 11, 9, 8, 13, 9, 15, 20, 11, 14, 13, 8, 18, 14, 10, 18, 16, 10, 17, 16, 13, 20, 20, 13, 14, 17, 12, 23, 18, 14, 22, 15, 17, 18, 21, 12, 19, 29, 16, 23, 21, 14, 27, 24
Offset: 1

Views

Author

Keywords

Comments

Zhang Ming-Zhi (zamiz(AT)mail.sc.cninfo.net) asks if a(m) is always > 0.
I have confirmed that a(n) > 0 for 0 < n < 10^7. - T. D. Noe, Oct 17 2004
This open problem is mentioned by Guy at the end of section C1. - T. D. Noe, Apr 22 2009
a(n) <= phi(2n+1)/2, where phi(m) = A000010(m), while a(n) = phi(2n+1)/2 only for n = 1, 2, and 7. - Thomas Ordowski, Jan 25 2014
Records in a(n) are for 2n+1 = 3, 5, 11, 15, 25, 35, 55, 65, 85, 125, 145, 185, 205, 215, 235, 265, 295, 325, 365, 415, ... cf. A001750. - Thomas Ordowski, Mar 02 2017
a(n) tends to be larger for n == 2 (mod 5): see plot in Links. - Robert Israel, Mar 02 2017
Number of primes p = ((2n+1)^2 + x^2)/2 for positive integers x < 2n+1. - Thomas Ordowski, Mar 06 2017

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Section C1.

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(isprime(i^2+(2*n+1-i)^2), 1, 0), i=1..n):
    seq(a(n), n=1..80);  # Alois P. Heinz, Jul 09 2016
  • Mathematica
    Table[cnt=0; m=2n+1; Do[If[PrimeQ[k^2+(m-k)^2], cnt++ ], {k, n}]; cnt, {n, 100}]
  • PARI
    a(n)=sum(k=1,n,isprime(k^2+(2*n-k+1)^2)) \\ Charles R Greathouse IV, Jan 09 2014

Formula

a(n) = O(n/log(n)). - Thomas Ordowski, Feb 11 2013

Extensions

More terms from David W. Wilson and Michael Kleber

A069004 Number of times n^2 + s^2 is prime for positive integers s < n.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 1, 3, 1, 4, 2, 1, 4, 3, 3, 3, 4, 3, 4, 6, 2, 4, 5, 3, 7, 6, 4, 4, 4, 4, 7, 6, 5, 6, 8, 5, 6, 7, 3, 9, 5, 5, 8, 8, 7, 9, 6, 7, 10, 8, 6, 9, 10, 5, 8, 8, 6, 10, 11, 8, 11, 10, 6, 9, 15, 5, 10, 11, 4, 11, 13, 6, 12, 10, 12, 11, 9, 8, 11, 19, 10, 15, 9, 8, 19, 11, 8, 11, 14, 15, 13
Offset: 1

Views

Author

T. D. Noe, Apr 02 2002

Keywords

Comments

Conjecture: a(n)>0 for all n>1. - Entries checked by Franklin T. Adams-Watters, May 05 2006
The graph of this sequence inspires the following conjecture: A > a(n)/pi(n) > B, where A and B are constants and pi(n) is the prime counting function (A000720). - T. D. Noe, Feb 26 2007
Stronger conjecture: Let pi(n) be the prime counting function (A000720). Then pi(n) >= a(n) >= pi(n)/5 for n>1, with the following equalities: pi(2)=a(2), pi(10)=a(10) and a(12)=pi(12)/5. - T. D. Noe, Feb 26 2007
Records in a(n) are for n = 1, 2, 5, 8, 10, 20, 25, 35, 40, 49, 59, 65, 80, 115, 125, 130, 158, 200, 250, 265, 310, ... - Thomas Ordowski, Mar 05 2017
Number of primes p = (x^2 + y^2)/2 with 0 < x < y such that x + y = 2n. - Thomas Ordowski, Mar 06 2017

Examples

			a(5)=2 because there are 2 values of s (2 and 4) such that 5^2 + s^2 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    maxN=100; lst={}; For[n=1, n<=maxN, n++, cnt=0; For[d=1, d?PrimeQ],{n,100}] (* _Harvey P. Dale, Mar 01 2023 *)
  • PARI
    a(n) = sum(s=1, n-1, isprime(n^2+s^2)); \\ Michel Marcus, Jan 15 2017

Formula

a(n) = O(n/log(n)). a(n) <= phi(n), a(n) = phi(n) for n = 2, 6, and 10. a(n) <= phi(2n)/2, a(n) = phi(2n)/2 for n = 2, 3, 5, 6, and 10. - Thomas Ordowski, Mar 01 2017

Extensions

Entries checked by Franklin T. Adams-Watters, May 05 2006
Showing 1-2 of 2 results.