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.

Previous Showing 11-18 of 18 results.

A117054 Number of ordered ways of writing n = i + j, where i is a prime and j is of the form k*(k+1), k > 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 15 2009

Keywords

Comments

Based on a posting by Zhi-Wei Sun to the Number Theory Mailing List, Mar 23 2008, where he conjectures that a(2n+1) > 0 for n >= 2.
Zhi-Wei Sun has offered a monetary reward for settling this conjecture.
No counterexample below 10^10. - D. S. McNeil

Crossrefs

Programs

  • Maple
    t0:=array(0..300); for n from 0 to 300 do t0[n]:=0; od:
    t1:=[seq(ithprime(i),i=1..70)]; t2:=[seq(n*(n+1),n=1..30)];
    for i from 1 to 70 do for j from 1 to 30 do k:=t1[i]+t2[j]; if k <= 300 then t0[k]:=t0[k]+1; fi; od: od:
    t3:=[seq(t0[n],n=1..300)];

A137996 Numbers which are not the sum of a triangular number and zero or a prime = 1 (mod 4).

Original entry on oeis.org

2, 4, 7, 9, 12, 22, 24, 25, 31, 46, 48, 70, 75, 80, 85, 87, 93, 121, 126, 135, 148, 162, 169, 186, 205, 211, 213, 216, 220, 222, 246, 255, 315, 331, 357, 375, 396, 420, 432, 441, 468, 573, 588, 615, 690, 717, 735, 738, 750, 796, 879, 924, 1029, 1038, 1080, 1155
Offset: 1

Views

Author

M. F. Hasler, Mar 24 2008

Keywords

Comments

Zhi-Wei SUN conjectured that n=216 is the only number not of the form n = p + k(k+1)/2 with p a prime or zero and more precisely that the numbers given in this sequence A137996(1..123) = 2,...,88956 are the only numbers which cannot be written in this form with p=0 or p=1 (mod 4).

Crossrefs

Programs

  • PARI
    { for( n=1,10^8, t=sqrtint(2*n); if( 0 >= p =n-t*(t+1)/2, !p & next, isprime(p) & p%4==1 & next); until( !t--, isprime( p+=t ) & p%4==1 & next(2)); print1(n","))}

A137997 Numbers which are not the sum of a triangular number and zero or a prime = 3 (mod 4).

Original entry on oeis.org

2, 5, 16, 27, 30, 42, 54, 61, 63, 90, 96, 129, 144, 165, 204, 216, 225, 285, 288, 309, 333, 340, 345, 390, 405, 423, 426, 448, 462, 525, 540, 556, 624, 651, 705, 801, 813, 876, 945, 960, 1056, 1230, 1371, 1380, 1470, 1491, 1827, 2085, 2157, 2181, 2220, 2355
Offset: 1

Views

Author

M. F. Hasler, Mar 24 2008

Keywords

Comments

Zhi-Wei SUN conjectured that n=216 is the only number not of the form n = p + k(k+1)/2 with p a prime or zero and more precisely that the numbers given in this sequence A137997(1..112) = 2,...,90441 are the only numbers which cannot be written in this form with p=0 or p=3 (mod 4).

Crossrefs

Programs

  • PARI
    for( n=1,10^8, t=sqrtint( 2*n ); if( 0>= p = n-t*(t+1)/2, !p && next, p -= t++ ); until( !t--, isprime( p+=t ) || next; p%4==3 && next(2)); print1( n"," ))

A187785 Number of ways to write n=x+y (x,y>=0) with {6x-1,6x+1} a twin prime pair and y a triangular number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 06 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>48624 not equal to 76106.
We have verified this for n up to 2*10^8. It seems that 723662 is the unique n>76106 which really needs y=0 in the described representation.
Compare the conjecture with another Sun's conjecture associated with A132399.

Examples

			a(9)=1 since 9=3+3(3+1)/2 with 6*3-1 and 6*3+1 both prime.
		

References

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

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[6(n-k(k+1)/2)-1]==True&&PrimeQ[6(n-k(k+1)/2)+1]==True,1,0],{k,0,(Sqrt[8n+1]-1)/2}]
    Do[Print[n," ",a[n]],{n,1,100}]

A256558 Number of ways to write n = p + floor(k*(k+1)/4), where p is a prime and k is a positive integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 01 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1.
(ii) For any integer m > 4 not equal to 12, each integer n > 1 can be written as p + floor((k^2-1)/m), where p is a prime and k is a positive integer.
We also have some other conjectures on representations n = p + floor(k*(k+1)/m) with m > 4.

Examples

			 a(15) = 1 since 15 = 5 + floor(6*7/4) with 5 prime.
a(420) = 1 since 420 = 419 + floor(2*3/4) with 419 prime.
a(945) = 1 since 945 = 877 + floor(16*17/4) with 877 prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[n-Floor[k(k+1)/4]],r=r+1],{k,1,(Sqrt[16n+1]-1)/2}];Print[n," ",r];Continue,{n,1,100}]

A238733 Number of primes p < n such that floor((n-p)/3) = (q-1)*(q-3)/8 for some prime q.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: (i) For any integers m > 2 and n > 2, there is a prime p < n such that floor((n-p)/m) has the form (q-1)*(q-3)/8 with q an odd prime.
(ii) If m > 2 and n > m + 1, then there is a prime p < n such that floor((n-p)/m) has the form (q^2 - 1)/8 with q an odd prime, except for the case m = 3 and n = 19.
Note that (q-1)*(q-3)/8 = r*(r+1)/2 with r = (q-3)/2. It seems that a(n) = 1 only for n = 3, 19, 25, 29, 31, 67, 79, 95, 96, 331, 373, 409.

Examples

			a(25) = 1 since floor((25-23)/3) = 0 = (3-1)*(3-3)/8 with 23 and 3 both prime.
a(96) = 1 since floor((96-11)/3) = 28 = (17-1)*(17-3)/8 with 11 and 17 both prime.
a(409) = 1 since floor((409-379)/3) = 10 = (11-1)*(11-3)/8 with 379 and 11 both prime.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=PrimeQ[Sqrt[8n+1]+2]
    t[n_,k_]:=TQ[Floor[(n-Prime[k])/3]]
    a[n_]:=Sum[If[t[n,k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]
  • PARI
    has(x)=issquare(8*x+1,&x) && isprime(x+2)
    a(n)=my(s); forprime(p=2,n-1,s+=has((n-p)\3)); s \\ Charles R Greathouse IV, Mar 03 2014

A335641 Number of ordered ways to write 2n+1 as p + x*(9x+7) with p prime and x an integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 03 2020

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0. Also, a(n) = 1 only for n = 1, 4, 5, 7, 8, 18, 24, 25, 42, 68, 70, 85, 117, 118, 196, 238, 287, 497, 628, 677, 732.
We have verified a(n) > 0 for all n = 1..2*10^8.
Conjecture 2: Let f(x) be any of the polynomials x*(3x+1), x*(5x+1), 2x*(3x+1), 2x*(3x+2). Then, each odd integer greater than one can be written as p + f(x) with p prime and x an integer.

Examples

			a(68) = 1, and 2*68+1 = 137 + 0*(9*0+7) with 137 prime.
a(117) = 1, and 2*117+1 = 233 + (-1)*(9*(-1)+7) with 233 prime.
a(238) = 1, and 2*238+1 = 461 + 1*(9*1+7) with 461 prime.
a(287) = 1, and 2*287+1 = 293 + (-6)*(9*(-6)+7) with 293 prime.
a(732) = 1, and 2*732+1 = 673 + 9*(9*9+7) with 673 prime.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[PrimeQ[2n+1-x*(9*x+7)],r=r+1],{x,-Floor[(Sqrt[36(2n+1)+49]+7)/18],(Sqrt[36(2n+1)+49]-7)/18}];
    tab=Append[tab,r],{n,1,100}];Print[tab]

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

Previous Showing 11-18 of 18 results.