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-2 of 2 results.

A086119 Numbers of the form p^3 + q^3, p, q primes.

Original entry on oeis.org

16, 35, 54, 133, 152, 250, 351, 370, 468, 686, 1339, 1358, 1456, 1674, 2205, 2224, 2322, 2540, 2662, 3528, 4394, 4921, 4940, 5038, 5256, 6244, 6867, 6886, 6984, 7110, 7202, 8190, 9056, 9826, 11772, 12175, 12194, 12292, 12510, 13498, 13718, 14364
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Examples

			133 belongs to the sequence because it can be written as 2^3 + 5^3.
		

Crossrefs

Programs

  • Mathematica
    sumList[x_List, y_List] := Module[{t = {}}, Do[t = Union[t, x[[i]] + y], {i, Length[x]}];  t]; nn = 10; Select[sumList[Prime[Range[nn]]^3, Prime[Range[nn]]^3], # < Prime[nn]^3 &]

Extensions

More terms from Alexander Adamchuk, Nov 10 2006

A086120 Natural numbers of the form p^3 - q^3, where p and q are primes.

Original entry on oeis.org

19, 98, 117, 218, 316, 335, 866, 988, 1206, 1304, 1323, 1854, 1946, 2072, 2170, 2189, 2716, 3582, 4570, 4662, 4788, 4886, 4905, 5308, 5402, 5528, 6516, 6734, 6832, 6851, 7254, 9970, 10586, 10836, 11824, 12042, 12140, 12159, 12222, 17530, 17624, 18268
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Comments

To find all differences p^3 - q^3 less than N, it is required that all primes p and q up to sqrt(N/6) be tested.

Examples

			117 belongs to the sequence because it can be written as 5^3 - 2^3.
		

Crossrefs

Cf. A086119, A086121. Also see A045636, A045699.

Programs

  • Mathematica
    sumList[x_List, y_List] := (punchline = {}; Do[punchline = Union[punchline, x[[i]] + y], {i, Length[x]}]; punchline); posPart[x_List] := (punchline = {}; Do[If[x[[i]] > 0, punchline = Union[punchline, {x[[i]]}]], {i, Length[x]}]; punchline); posPart[sumList[Prime[Range[10]]^3, - Prime[Range[10]]^3]]
    nn=10^5; Union[Reap[Do[n=Prime[i]^3-Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[Sqrt[nn/6]]}, {j,i-1}]][[2,1]]] (* T. D. Noe, Oct 04 2010 *)
    With[{upto=20000},Select[Abs[#[[1]]-#[[2]]]&/@Subsets[Prime[ Range[ Sqrt[ upto/6]]]^3,{2}]//Union,#<=upto&]] (* Harvey P. Dale, Dec 10 2017 *)

Extensions

Corrected by T. D. Noe, Oct 04 2010
Showing 1-2 of 2 results.