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.

A336451 Primes of form x^3 - (x + 1)^3 + 3*z^3 or -x^3 + (x + 1)^3 - 3*z^3, with x,z >= 0.

Original entry on oeis.org

2, 5, 7, 13, 17, 19, 23, 29, 31, 37, 53, 59, 61, 67, 73, 79, 101, 103, 107, 113, 127, 131, 139, 149, 173, 179, 181, 191, 193, 199, 251, 263, 269, 271, 277, 307, 317, 331, 367, 373, 379, 383, 389, 397, 431, 439, 479, 503, 509, 521, 523, 547, 557, 563, 569, 571
Offset: 1

Views

Author

XU Pingya, Aug 31 2020

Keywords

Comments

For z <= 10^6, no other prime have this form in the first 105 primes.

Examples

			0^3 - 1^3 + 3*2^3 = 23, 23 is a term.
-3^3 + 4^3 - 3*0^3 = -4^3 + 5^3 - 3*2^3 = -52^3 + 53^3 - 3*14^3 = 37, 37 is a term.
		

Crossrefs

Programs

  • Mathematica
    p1 = Select[Prime[Range[105]], IntegerQ[(# - 1)/3] &];
    p2 = Select[Prime[Range[105]], IntegerQ[(# + 1)/3] &];
    n1 = Length@p1; n2 = Length@p2;
    r1 = (p1 - 1)/3; r2 = (p2 + 1)/3;
    t = {};
    Do[x = (z^3 + r1[[n]] + 1/4)^(1/2) - 1/2;
     If[IntegerQ[x], AppendTo[t, -x^3 + (x + 1)^3 - 3z^3]], {n, 1,
      n1}, {z, 0, 270}]
    Do[x = (z^3 - r2[[n]] + 1/4)^(1/2) - 1/2;
     If[IntegerQ[x], AppendTo[t, x^3 - (x + 1)^3 + 3z^3]], {n, 1,
      n2}, {z, 0, 170}]
    Union@t