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.

A022551 Numbers that are the sum of 2 squares and a nonnegative cube.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A022552.

Programs

  • Maple
    isA022551 := proc(n)
        local a,b,c ;
        for c from 0 do
            if c^3 > n then
                return false;
            end if;
            for a from 0 do
                b2 := n-c^3-a^2 ;
                if b2 < a^2 then
                    break;
                end if;
                if issqr(b2) then
                    return true;
                end if;
            end do:
        end do:
    end proc: # R. J. Mathar, Sep 02 2016
  • Mathematica
    max = 1000;
    Table[x^2 + y^2 + z^3, {x, 0, Sqrt[max]}, {y, x, Sqrt[max - x^2]}, {z, 0, (max - x^2 - y^2)^(1/3)}] // Flatten // Union // Select[#, # <= max&]& (* Jean-François Alcover, Mar 23 2020 *)