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.

A045980 Numbers of the form x^3 + y^3 or x^3 - y^3.

Original entry on oeis.org

0, 1, 2, 7, 8, 9, 16, 19, 26, 27, 28, 35, 37, 54, 56, 61, 63, 64, 65, 72, 91, 98, 117, 124, 125, 126, 127, 128, 133, 152, 169, 189, 208, 215, 216, 217, 218, 224, 243, 250, 271, 279, 280, 296, 316, 331, 335, 341, 342, 343, 344, 351, 370, 386, 387, 397, 407, 432
Offset: 1

Views

Author

Keywords

Comments

Sums of two integer cubes. - Charles R Greathouse IV, Mar 30 2022

Examples

			7 = (2)^3 + (-1)^3.
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 86.

Crossrefs

A004999 and A003325 are subsequences.

Programs

  • Haskell
    a045980 n = a045980_list !! (n-1)
    a045980_list = 0 : filter f [1..] where
       f x = g $ takeWhile ((<= 4 * x) . (^ 3)) $ a027750_row x where
         g [] = False
         g (d:ds) = r == 0 && a010052 (d ^ 2 - 4 * y) == 1 || g ds
           where (y, r) = divMod (d ^ 2 - div x d) 3
    -- Reinhard Zumkeller, Dec 20 2013
  • Mathematica
    Union[Select[Sort[Flatten[Table[{j^3-i^3, j^3+i^3}, {i, 0, 20}, {j, i, 20}]]], #<20^3-19^3&]]
    With[{nn=20},Take[Union[Select[Flatten[{Total[#],#[[1]]-#[[2]]}&/@(Tuples[ Range[0,nn],2]^3)],#>-1&]],3*nn]] (* Harvey P. Dale, Jun 22 2014 *)
  • PARI
    is(n)=fordiv(n,d, my(L=(d^2-n/d)/3); if(denominator(L)==1 && issquare(d^2-4*L), return(1))); 0 \\ Charles R Greathouse IV, Jun 12 2012
    
  • PARI
    list(lim)={
        my(v=List(),x3,t);
        for(x=0,sqrtnint(lim\=1,3),
            x3=x^3;
            for(y=0,min(sqrtnint(lim-x3,3),x),
                listput(v,x3+y^3)
            )
        );
        for(x=2,t=sqrtint(lim\3),
            x3=x^3;
            for(y=sqrtnint(max(0,x3-lim-1),3)+1,x-1,
                listput(v,x3-y^3)
            )
        );
        t=(t+1)^3-t^3;
        if(t<=lim,listput(v,t));
        Set(v);
    } \\ Charles R Greathouse IV, Jun 12 2012, updated Jan 13 2022
    
  • PARI
    is(n)=#thue(thueinit(z^3+1),n) \\ Ralf Stephan, Oct 18 2013
    

A222305 Numbers k such that 9k is in A045980.

Original entry on oeis.org

0, 1, 3, 6, 7, 8, 13, 14, 21, 24, 27, 31, 38, 39, 43, 48, 52, 56, 57, 64, 73, 78, 81, 84, 91, 95, 104, 105, 111, 112, 125, 133, 134, 147, 148, 155, 157, 162, 168, 183, 186, 189, 192, 195, 206, 211, 216, 237, 241, 244, 245, 248, 258, 259, 273, 291, 294, 301, 304, 305, 307, 312, 343, 344, 351, 372, 375, 378, 381, 384
Offset: 1

Views

Author

N. J. A. Sloane, Feb 15 2013, based on a suggestion from Allan C. Wechsler

Keywords

Comments

The sequence "numbers k such that 3k is in A045980" consists of these numbers multiplied by 3.

Crossrefs

Programs

A222306 Numbers k such that 4k is in A045980.

Original entry on oeis.org

0, 2, 4, 7, 14, 16, 18, 31, 32, 38, 52, 54, 56, 70, 74, 79, 86, 108, 112, 117, 122, 126, 128, 130, 144, 151, 182, 189, 196, 234, 247, 248, 250, 252, 254, 256, 266, 268, 304, 326, 333, 338, 364, 367, 378, 416, 430, 432, 434, 436, 448, 486, 500, 511, 515, 518, 542, 549, 556, 558, 560, 592, 632, 635, 662, 670, 679, 682
Offset: 1

Views

Author

N. J. A. Sloane, Feb 15 2013, based on a suggestion from Allan C. Wechsler

Keywords

Crossrefs

Programs

Showing 1-3 of 3 results.