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.

A259836 Integers n where n^3 + (n+1)^3 is a Taxicab number A001235.

This page as a plain text file.
%I A259836 #97 Jan 11 2016 20:59:02
%S A259836 9,121,235,301,1090,1293,1524,3152,8010,15556,15934,19247,20244,21498,
%T A259836 24015,25363,25556,45462,57872,63758,80016,93349,94701,101929,113098,
%U A259836 119942,132414,143653,167147,186540,192629,229508,246122,247318,292154,307534,322870
%N A259836 Integers n where n^3 + (n+1)^3 is a Taxicab number A001235.
%H A259836 David Rabahy and Alois P. Heinz and Chai Wah Wu, <a href="/A259836/b259836.txt">Table of n, a(n) for n = 1..90</a> (first 38 terms from David Rabahy, next 12 terms from Alois P. Heinz)
%e A259836 9^3 + 10^3 = 1729 = A001235(1), so 9 is in the sequence.
%p A259836 filter:= proc(n)
%p A259836   local D, b, a, Q;
%p A259836   D:= numtheory:-divisors(n);
%p A259836   for b in D do
%p A259836     a:= n/b;
%p A259836     Q:= 12*b - 3*a^2;
%p A259836     if Q > 9 and issqr(Q) and Q < 9*a^2 then return true fi
%p A259836   od;
%p A259836   false
%p A259836 end proc:
%p A259836 select(x -> filter(x^3 +(x+1)^3), [$1..100000]); # _Robert Israel_, Jul 07 2015
%t A259836 Select[Range[10000], Length[PowersRepresentations[#^3 + (# + 1)^3, 2, 3]]==2 &] (* _Vincenzo Librandi_, Jul 10 2015 *)
%o A259836 (Python 3.x)
%o A259836 start = 9
%o A259836 end = 500000
%o A259836 print(start,end)
%o A259836 cubes = []
%o A259836 t = end**3+(end+1)**3
%o A259836 max = int(t**(1/3)+.5)
%o A259836 for i in range(0,max+1):
%o A259836   cubes.append(i**3)
%o A259836 for x in range(start,end):
%o A259836   t = cubes[x]+cubes[x+1]
%o A259836   for i in range(1,x):
%o A259836    z = t-cubes[i]
%o A259836    n = int(z**(1/3)+.5)
%o A259836    if cubes[n] == z:
%o A259836     print(x,x+1,i,n,'\a')
%o A259836 (Python)
%o A259836 from __future__ import division
%o A259836 from gmpy2 import is_square
%o A259836 from sympy import divisors
%o A259836 A259836_list = []
%o A259836 for n in range(10000):
%o A259836     m = n**3+(n+1)**3
%o A259836     for x in divisors(m):
%o A259836         x2 = x**2
%o A259836         if x2 > m:
%o A259836             break
%o A259836         if x != (2*n+1) and m < x*x2 and is_square(12*m//x-3*x2):
%o A259836             A259836_list.append(n)
%o A259836             break # _Chai Wah Wu_, Jan 10 2016
%Y A259836 Cf. A001235, A005898.
%K A259836 nonn
%O A259836 1,1
%A A259836 _David Rabahy_, Jul 06 2015