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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268509 Numbers x such that x^3 = y^2 + z for some y and some nonzero z with -x < z < x. 3

%I #29 Mar 21 2016 21:22:46

%S 2,3,5,13,15,17,32,35,37,40,43,46,52,56,63,65,99,101,109,136,143,145,

%T 152,158,175,190,195,197,243,255,257,312,317,323,325,331,336,351,356,

%U 366,377,399,401,422,483,485,560,568,575,577,584,592,654,675,677,717,741,783,785,799,810,891,899,901,909,937,944,978

%N Numbers x such that x^3 = y^2 + z for some y and some nonzero z with -x < z < x.

%C List of x such as x^3 is a near square (see examples).

%C Note that z = 17 appears often (see A029728).

%H Daniel Mondot, <a href="/A268509/b268509.txt">Table of n, a(n) for n = 1..10000</a>

%e 2^3 = 3^2 - 1;

%e 3^3 = 5^2 + 2;

%e 5^3 = 11^2 + 4;

%e 13^3 = 47^2 - 12;

%e 15^3 = 58^2 + 11;

%e 17^3 = 70^2 + 13;

%e 32^3 = 181^2 + 7;

%e 35^3 = 207^2 + 26;

%e 37^3 = 225^2 + 28;

%e 40^3 = 253^2 - 9;

%e 43^3 = 282^2 - 17;

%e 46^3 = 312^2 - 8;

%e 52^3 = 375^2 - 17;

%e 56^3 = 419^2 + 55;

%e 63^3 = 500^2 + 47;

%e 65^3 = 524^2 + 49;

%e 99^3 = 985^2 + 74.

%o (C)

%o #include <stdio.h>

%o #include <stdlib.h>

%o #include <math.h>

%o #define MAX2 10000

%o /* list number x and y such that x^3 = y^2 ± delta (0 < delta < x) */

%o /* this generates A268509 and A268510 */

%o long long unsigned b,c,d;

%o long long signed ds;

%o unsigned long long list2[MAX2];

%o unsigned long long list3[MAX2];

%o long double b1, cd, dd;

%o void main(unsigned argc, char *argv[])

%o {

%o unsigned a, i;

%o i=0;

%o // I never actually calculate b^3 or c^2, but only b^(3/2) = c + ds

%o // this allows me to indirectly check b^3 past 2^64

%o for (b=0; b<100000000; ++b) // could go up to b<4294967295u; max

%o {

%o b1 = sqrtl(b);

%o cd= b1 *(long double)b;

%o c=(long long unsigned)(cd+(double)0.5);

%o dd = 2 * c * (cd - c);

%o if (dd<0) ds = (dd - 0.5);

%o else ds = (dd + 0.5);

%o d = llabs(ds);

%o if (d<b) // d = abs(b^3 - c^2)

%o {

%o if (ds)

%o {

%o if (i<MAX2)

%o {

%o list2[i]= b;

%o list3[i++]= c;

%o }

%o }

%o }

%o }

%o // generate A268509 */

%o for (a=0; a<i; ++a) printf("%u %llu\n", a+1, list2[a]);

%o printf("\n\n");

%o // generate A268510 */

%o for (a=0; a<i; ++a) printf("%u %llu\n", a+1, list3[a]);

%o printf("\n\n");

%o }

%o (PARI) is(n)=my(t=abs(n^3-round(n^1.5)^2)); 0<t && t<n \\ _Charles R Greathouse IV_, Feb 09 2016

%Y Cf. A029728, A253181, A268510.

%K nonn

%O 1,1

%A _Daniel Mondot_, Feb 06 2016

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)