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.

A256119 Least number p that is zero or an odd prime, such that n - p is a generalized pentagonal number.

Original entry on oeis.org

0, 0, 0, 3, 3, 0, 5, 0, 3, 7, 3, 11, 0, 11, 7, 0, 11, 5, 3, 7, 5, 19, 0, 11, 17, 3, 0, 5, 13, 3, 23, 5, 17, 7, 19, 0, 29, 11, 3, 13, 0, 19, 7, 3, 29, 5, 11, 7, 13, 23, 43, 0, 17, 13, 3, 29, 5, 0, 7, 19, 3, 59, 5, 23, 7, 43, 31, 41, 11, 29, 0, 31, 37, 3, 17, 5, 19, 0, 43, 53, 3, 11, 5, 13, 7, 59, 29, 17, 11, 19, 13, 79, 0, 23, 17, 3, 19, 5, 41, 7, 0
Offset: 0

Views

Author

Zhi-Wei Sun, Mar 15 2015

Keywords

Comments

By the conjecture in A256071, a(n) always exists.

Examples

			a(21) = 19 since 21 is not a generalized pentagonal number, and 19 is the least odd prime p with 21 - p a generalized pentagonal number.
a(26) = 0 since 26 = (-4)*(3*(-4)-1)/2 is a generalized pentagonal number.
		

Crossrefs

Programs

  • Mathematica
    Pen[n_]:=IntegerQ[Sqrt[24n+1]]
    Do[If[Pen[n],Print[n," ",0];Goto[aa]];Do[If[Pen[n-Prime[k]],Print[n," ",Prime[k]];Goto[aa]],{k,2,PrimePi[n]}];Label[aa];Continue,{n,0,100}]

A257497 Number of ordered ways to write n as the sum of a term of A257121 and a positive generalized pentagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 26 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 54, 84, 87, 109, 174, 252, 344, 1234, 1439, 2924.
This implies the Twin Prime Conjecture.

Examples

			a(1439) = 1 since 1439 = 1424 + 15 = floor(4274/3) + (-3)*(3*(-3)-1)/2 with {3*4274-1,3*4274+1} = {12821,12823} a twin prime pair.
a(2924) = 1 since 2924 = 2334 + 590 = floor(7004/3) + 20*(3*20-1)/2 with {3*7004-1, 3*7004+1} = {21011,21013} a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=PrimeQ[3n-1]&&PrimeQ[3n+1]
    PQ[n_]:=TQ[3*n]||TQ[3*n+1]||TQ[3n+2]
    SQ[n_]:=IntegerQ[Sqrt[24n+1]]
    Do[m=0;Do[If[PQ[x]&&SQ[n-x],m=m+1],{x,0,n-1}];
    Print[n," ",m];Continue,{n,1,100}]

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]
Showing 1-3 of 3 results.