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.

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]}]

A210646 Primes which are the sum of two numbers of the form k*(k+1)^2/2.

Original entry on oeis.org

2, 11, 59, 149, 197, 233, 607, 829, 929, 1283, 1619, 1879, 2459, 2917, 3251, 3299, 3359, 3947, 4523, 5821, 5843, 5869, 6043, 6143, 6269, 6833, 7229, 8573, 8597, 9479, 9619, 11699, 11783, 11789, 12379, 14639, 15881, 16477, 18869, 19121, 20849, 21149, 21617
Offset: 1

Views

Author

Gerasimov Sergey, Mar 26 2012

Keywords

Examples

			149 is in the sequence because 149 is prime and 149 = 2*(2+1)^2/2 + 6*(6+1)^2/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := n (n + 1)^2/2; t = Table[f[n], {n, 0, 40}]; Select[Union[Flatten[Outer[Plus, t, t]]], # < t[[-1]] && PrimeQ[#] &] (* T. D. Noe, Apr 03 2012 *)

Extensions

Terms checked by R. J. Mathar, Mar 28 2012

A210647 Least nonnegative m such that k(n) + k(m) is prime, where k(n) = n*(n+1)^2/2.

Original entry on oeis.org

0, 1, 22, 2, 142, 1, 2, 10, 22, 1, 34, 10, 2, 37, 46, 6, 10, 1, 6, 46, 46, 1, 10, 106, 6, 1, 58, 2, 22, 7, 2, 58, 94, 3, 22, 10, 2, 1, 22, 2, 10, 16, 6, 82, 118, 4, 82, 10, 18, 1, 10, 2, 22, 1, 2, 10, 10, 4, 22, 58, 2, 19, 10, 2, 46, 1, 10, 70, 82, 3, 22, 34
Offset: 1

Views

Author

Gerasimov Sergey, Mar 27 2012

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := n (n + 1)^2/2; Table[k = 0; While[! PrimeQ[f[n] + f[k]], k++]; k, {n, 100}] (* T. D. Noe, Apr 03 2012 *)
  • PARI
    a(n)=my(K=n*(n+1)^2/2,m);while(!isprime(K+m*(m+1)^2/2),m++);m \\ Charles R Greathouse IV, Aug 03 2012

Extensions

Corrected by R. J. Mathar, Mar 31 2012
Showing 1-3 of 3 results.