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

A130504 Number of k for which T(n) + T(k) is prime, with 0<=k<=n and triangular number T(n)=n(n+1)/2.

Original entry on oeis.org

0, 1, 1, 1, 2, 0, 1, 3, 1, 1, 2, 1, 1, 4, 0, 1, 8, 2, 3, 4, 1, 3, 7, 3, 0, 4, 3, 3, 6, 2, 1, 6, 2, 3, 6, 2, 3, 7, 4, 2, 8, 2, 4, 7, 2, 3, 15, 5, 3, 6, 2, 5, 13, 5, 1, 6, 2, 3, 21, 3, 3, 14, 3, 6, 7, 2, 5, 15, 6, 3, 6, 5, 9, 15, 4, 3, 12, 3, 6, 18, 3, 7, 16, 4, 6, 7, 7, 5, 15, 1, 4, 17, 5, 6, 9, 7, 8, 18, 6, 5
Offset: 0

Views

Author

T. D. Noe, Jun 04 2007

Keywords

Comments

It appears that a(n)=0 for n=0,5,14,24 only. See A129634 for the least k.

Examples

			a(4)=2 because 10+1 and 10+3 are prime; a(7)=3 because 28+1, 28+3 and 28+15 are primes.
		

Crossrefs

Cf. A069004 (for square numbers).

Programs

  • Mathematica
    nn=100; tri=Range[0,nn]Range[nn+1]/2; Table[cnt=0; Do[If[PrimeQ[tri[[k]]+tri[[n]]], cnt++ ], {k,n}]; cnt, {n,Length[tri]}]

A281543 Number of partitions n = x + y with y >= x > 0 such that x^2 + y^2 or (x^2 + y^2)/2 is prime.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, 3, 1, 4, 3, 4, 1, 4, 4, 3, 2, 4, 1, 8, 4, 4, 3, 6, 3, 5, 3, 4, 4, 9, 3, 8, 4, 6, 6, 9, 2, 7, 4, 7, 5, 7, 3, 5, 7, 7, 6, 9, 4, 14, 4, 8, 4, 9, 4, 11, 7, 7, 6, 17, 5, 11, 6, 10, 8, 9, 5, 11, 6, 9, 7, 8, 3, 13, 9, 9, 5, 15, 5, 20, 8, 11, 8, 14, 7, 13, 9, 8, 6, 18, 7, 14, 10, 10, 8
Offset: 1

Views

Author

Thomas Ordowski and Altug Alkan, Mar 01 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
We have a(n) <= phi(n)/2 for n <> 2, because must be gcd(x,y) = 1.
Numbers n such that a(n) = phi(n)/2 are 3, 4, 5, 6, 10, 12, 15, and 20.
Record values of a(n) are for n = 1, 2, 5, 11, 15, 25, 35, 55, 65, 85, 125, 145, 185, 205, 215, 235, 265, 295, 325, 365, 415, ... cf. A001750.

Examples

			a(5) = 2 because 5 = 1 + 4 and 5 = 2 + 3 are only options; 1^2 + 4^2 = 17 and 2^2 + 3^2 = 13 are primes.
a(6) = 1 because 6 = 1 + 5 is only option; (1^2 + 5^2)/2 = 13 is prime.
a(7) = 2 because 7 = 1 + 6, 7 = 2 + 5 and 7 = 3 + 4, but 3^2 + 4^2 = 5^2.
		

Crossrefs

Programs

  • PARI
    a(n) = if(n==2, 1, if(n%2==0, sum(k=1, n/2-1, isprime(n^2/4+k^2)), sum(k=1, (n-1)/2, isprime(k^2+(n-k)^2))));

Formula

a(2m+1) = A036468(m) for m > 0.
a(2m) = A069004(m) for m > 1.
a(n) = O(n/log(n)).

A057368 Number of Gaussian primes (in the first half-quadrant; i.e., 0 to 45 degrees) with real part = n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Sep 22 2000

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. - 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(3)=a(3), pi(10)=a(10) and a(12)=pi(12)/5. - T. D. Noe, Feb 26 2007

References

  • Mark A. Herkommer, "Number Theory, A Programmer's Guide," McGraw-Hill, New York, 1999, page 269.

Crossrefs

Cf. A055683 and A057352.
Cf. A069004.

Programs

  • Mathematica
    Do[ c=0; Do[ If[ PrimeQ[ j + k*I, GaussianIntegers -> True ], c++ ], {j, n, n}, {k, 0, j} ]; Print[ c ], {n, 1, 75} ]

Formula

a(n) = A069004(n) + 1 if n is 1 or a prime = 3 (mod 4), A069004(n) otherwise. - Franklin T. Adams-Watters, May 05 2006
a(n) = O(n/log(n)). - Thomas Ordowski, Mar 06 2017

Extensions

More terms from Franklin T. Adams-Watters, May 05 2006

A283004 Number of primes of the form n^4 + k^4 (A002645) with 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v and Altug Alkan, Feb 26 2017

Keywords

Examples

			a(4) = 2 because 4^4 + 1^4 = 257 and 4^4 + 3^4 = 337 are prime numbers.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = Mod[n, 2] + 1, c = 0}, While[b < n, If[ Mod[n^4 + b^4, 16] == 1 && PrimeQ[n^4 + b^4], c++]; b++]; c]; f[1] = 1; Array[f, 90]
  • PARI
    a(n) = if(n==1, 1, sum(k=1, n-1, isprime(n^4+k^4)));
    
  • PARI
    first(n)=my(v=vector(n),n4); for(N=1,n, n4=N^4; forstep(k=N%2+1,N,2, if(isprime(n4+k^4), v[N]++))); v[1]++; v \\ Charles R Greathouse IV, Feb 27 2017
Showing 1-4 of 4 results.