The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A022551 Numbers that are the sum of 2 squares and a nonnegative cube. 7

%I #19 Apr 27 2020 02:26:59

%S 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,

%T 30,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,

%U 54,56,57,58,59,60,61,62

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

%H Jean-François Alcover, <a href="/A022551/b022551.txt">Table of n, a(n) for n = 1..943</a>

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%p isA022551 := proc(n)

%p local a,b,c ;

%p for c from 0 do

%p if c^3 > n then

%p return false;

%p end if;

%p for a from 0 do

%p b2 := n-c^3-a^2 ;

%p if b2 < a^2 then

%p break;

%p end if;

%p if issqr(b2) then

%p return true;

%p end if;

%p end do:

%p end do:

%p end proc: # _R. J. Mathar_, Sep 02 2016

%t max = 1000;

%t 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 *)

%Y Complement of A022552.

%K nonn

%O 1,3

%A _N. J. A. Sloane_.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 4 12:21 EST 2024. Contains 370532 sequences. (Running on oeis4.)