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.

A132399 Number of ordered ways of writing n = i + j, where i is 0 or a prime and j is a triangular number (A000217) >= 0.

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 3, 1, 3, 1, 2, 2, 2, 3, 2, 2, 1, 4, 2, 2, 3, 2, 2, 4, 2, 1, 3, 1, 3, 3, 2, 2, 4, 2, 3, 2, 1, 2, 4, 3, 2, 4, 1, 3, 4, 2, 2, 6, 2, 2, 3, 2, 3, 4, 1, 2, 3, 3, 4, 4, 2, 1, 6, 1, 3, 3, 2, 3, 6, 3, 1, 4, 2, 4, 6, 1, 3, 4, 2, 4, 3, 3, 4, 5, 2, 3, 4, 1, 3, 7, 1, 2, 4, 2, 3, 5, 2, 4, 5, 2, 2, 3, 3, 4, 6
Offset: 0

Views

Author

N. J. A. Sloane, Mar 23 2008

Keywords

Comments

Based on a posting by Zhi-Wei Sun to the Number Theory Mailing List, Mar 23 2008, where he conjectures that a(n) > 0 except for n = 216.
Zhi-Wei Sun has offered a monetary reward for settling this conjecture.
No counterexample below 10^10. - D. S. McNeil
Note that A076768 contains 216 and the numbers n whose only representation has 0 instead of a prime; all other integers appear to be the sum of a prime and a triangular number. Except for n=216, there is no other n < 2*10^9 for which a(n)=0.
It is clear that a(t) > 0 for any triangular number t because we always have the representation t = t+0. Triangular numbers tend to have only a few representations. Hence by not plotting a(n) for triangular n, the plot (see link) more clearly shows how a(n) slowly increases as n increases. This is more evidence that 216 is the only exception.
216 is the only exception less than 10^12. Let p(n) be the least prime (or 0 if n is triangular) such that n = p(n) + t(n), where t(n) is a triangular number. For n < 10^12, the largest value of p(n) is only 2297990273, which occurs at n=882560134401. - T. D. Noe, Jan 23 2009

Examples

			0 = 0+0, so a(0) = 1,
3 = 3+0 = 2+1 = 0+3, so a(3) = 3.
8 = 7+1 = 5+3 = 2+6, so a(8) = 3.
		

Crossrefs

Cf. A065397 (primes p whose only representation as the sum of a prime and a triangular number is p+0), A090302 (largest prime p for each n).
Cf. A154752 (smallest prime p for each n). - T. D. Noe, Jan 19 2009

Extensions

Corrected, edited and extended by T. D. Noe, Mar 26 2008
Edited by N. J. A. Sloane, Jan 15 2009

A154752 Least prime p (or 0) such that n = p + T, where T is a triangular number (A000217), or -1 if there is no such representation.

Original entry on oeis.org

0, 2, 0, 3, 2, 0, 7, 2, 3, 0, 5, 2, 3, 11, 0, 13, 2, 3, 13, 5, 0, 7, 2, 3, 19, 5, 17, 0, 19, 2, 3, 11, 5, 13, 7, 0, 31, 2, 3, 19, 5, 41, 7, 23, 0, 31, 2, 3, 13, 5, 23, 7, 17, 53, 0, 11, 2, 3, 23, 5, 61, 7, 53, 19, 29, 0, 31, 2, 3, 67, 5, 17, 7, 19, 47, 31, 11, 0, 13, 2, 3, 37, 5, 29, 7, 31, 59, 43
Offset: 1

Views

Author

T. D. Noe, Jan 17 2009

Keywords

Comments

Zhi-Wei Sun conjectures that only n=216 has no such representation. It appears that n = 2, 7, 61 and 211 are the only numbers for which the triangular number 0 is required in the representation (see A065397). When n is a triangular number, then a(n)=0. Sequence A132399 gives the number of representations of n as p+T. As n becomes larger, the largest prime required to verify the conjecture increases slowly. For example, for n<=10^3, the largest prime required is 953; for n<=10^6 it is 373361; for n<=10^9 it is only 36455351. Using primes less than 10^9, all n<243277591560 have been verified.

Examples

			n=p+T: 1=0+1; 2=2+0; 3=0+3; 4=3+1; 5=2+3; 6=0+6; 7=7+0; 8=2+6; 9=3+6; 10=0+10.
		

References

  • Zhi-Wei Sun, On sums of primes and triangular numbers, Journal of Combinatorics and Number Theory, 1(2009), no.1, 65-76.

Programs

  • Mathematica
    nn=300; s=0; tri=Rest[Reap[i=0; While[s1 && !PrimeQ[p], m-- ]; If[m==1 && !PrimeQ[p], -1, p]], {n,nn}]

Extensions

Offset in b-file corrected by N. J. A. Sloane, Aug 31 2009

A065396 Primes of the form p + k*(k+1) / 2, p prime and k > 0.

Original entry on oeis.org

3, 5, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2001

Keywords

Comments

a(2) = 11 = 5 + 3*(3+1) / 2.

Crossrefs

Programs

  • Mathematica
    Module[{upto=300,trs},trs=Accumulate[Range[(Sqrt[1+8upto]-1)/2]];Select[ Flatten[ Table[p+trs,{p,Prime[Range[PrimePi[upto]]]}]],PrimeQ[#] && #<=upto&]]//Union (* Harvey P. Dale, Dec 16 2017 *)

A155190 Non-triangular numbers having a unique representation as p + t, where p is prime and t is a triangular number.

Original entry on oeis.org

2, 4, 7, 9, 16, 25, 27, 42, 54, 61, 63, 70, 75, 87, 90, 121, 126, 129, 135, 186, 211, 246, 315, 333, 345, 396, 405, 540, 556, 690, 717, 801, 924, 960, 1080, 1863, 2376, 2826, 3900, 6210, 8316
Offset: 1

Views

Author

T. D. Noe, Jan 21 2009

Keywords

Comments

Conjectured to be finite. The prime terms are in A065397.

Examples

			n=p+t: 2=2+0; 4=3+1; 7=7+0; 9=3+6; 16=13+3; 25=19+6; 27=17+10; 42=41+1; 54=53+1
		

Crossrefs

A255904 Numbers that are neither triangular nor the sum of a positive triangular number and a prime.

Original entry on oeis.org

2, 7, 61, 211, 216
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 10 2015

Keywords

Comments

Probably finite.
First four terms are primes, and are in A065397.
If it exists, a(6) > 5*10^6. - Derek Orr, Mar 12 2015
If it exists, a(6) > 4*10^9. - Hiroaki Yamanouchi, Mar 16 2015

Examples

			a(2) = 7 is in the sequence because 7 is not a triangular number, and cannot be written as a sum of the primes < 7 {2, 3, 5} and one of the positive triangular numbers < 7 {1, 3, 6}.
		

Crossrefs

Programs

  • Magma
    lst:=[]; r:=21; for n in [0..r*(r+1)/2] do if not IsSquare(8*n+1) then f:=0; k:=1; while k*(k+1)/2 lt n-1 do if IsPrime(n-Truncate(k*(k+1)/2)) then f:=1; break; end if; k+:=1; end while; if IsZero(f) then Append(~lst, n); end if; end if; end for; lst;
    
  • PARI
    a(n)=k=1;while(n-(t=k*(k+1)/2)>=0,if(isprime(n-t)||n==t,return(k));k++)
    n=1;while(n<10^5,if(!a(n),print1(n,", "));n++) \\ Derek Orr, Mar 12 2015
Showing 1-5 of 5 results.