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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A054221 Consider all integer triples (i,j,k), j,k>0, with binomial(i+2,3)=binomial(j+2,3)+k^3, ordered by increasing i; sequence gives i values. 4

%I #19 Jan 15 2019 02:48:04

%S 7,8,10,23,27,48,64,125,199,216,343,512,621,729,978,1000,1222,1331,

%T 1728,2197,2744,3375,3563,4034,4096,4331,4913,5017,5832,6442,6859,

%U 6886,7783,8000,8699,9261,10648,11157,12167,12287,12386,13824,15625,17576,19683

%N Consider all integer triples (i,j,k), j,k>0, with binomial(i+2,3)=binomial(j+2,3)+k^3, ordered by increasing i; sequence gives i values.

%C Sequence contains all positive cubes, since binomial(n+2,3)-binomial(n,3)=n^2. j values are A054222 and k values are A054223.

%H Bert Dobbelaere, <a href="/A054221/b054221.txt">Table of n, a(n) for n = 0..271</a> (terms 0..84 from Joerg Arndt)

%e binomial(7+2,3)=84=binomial(4+2,3)+4^3; binomial(8+2,3)=120=binomial(6+2,3)+4^3;

%t max = 20000; s = {}; Do[k = ((i*(i+1)*(i+2) - j*(j+1)*(j+2))/6)^(1/3); If[IntegerQ[k], Print[i]; AppendTo[s, i]], {j, 1, max}, {i, j+1, max}]; Sort[s] (* _Jean-François Alcover_, Oct 12 2011 *)

%o (C)

%o #include <stdio.h>

%o #include <limits.h>

%o #include <math.h>

%o typedef unsigned long long ULL;

%o unsigned A000578inv(ULL n)

%o {

%o ULL n3 = (ULL)cbrt((double)n) ;

%o for (ULL k= n3-1 ; k <= n3+1 ; k++)

%o if ( k*k*k == n) return k;

%o return 0 ;

%o }

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

%o {

%o const ULL imax = cbrt((double)ULLONG_MAX)-2. ;

%o for(unsigned i=1; i<imax; i++)

%o {

%o ULL i3 = i*(ULL)(i+1)*(ULL)(i+2) ;

%o for(unsigned j=1 ; j < i ; j++)

%o { ULL k3 = i3- j*(ULL)(j+1)*(ULL)(j+2) ;

%o if( k3 % 6 == 0)

%o {

%o unsigned k=A000578inv(k3/6) ;

%o if ( k ) { printf("%d, ", i) ; fflush(stdout) ; }

%o }

%o }

%o }

%o }

%o // _R. J. Mathar_, Nov 10 2006

%o (Python)

%o # Algorithm without multiplications nor divisions.

%o n=0; i=0; T_i=0

%o while i<100000:

%o ..j=i; i+=1; k=1; kd2=1; kd3=0; T_j=T_i; delta=T_j+j; T_i+=i;

%o ..while j>0:

%o ....if delta>0:

%o ......kd3+=6; kd2+=kd3; delta-=kd2; k+=1;

%o ....else:

%o ......if delta==0:

%o ........print("A054221(%d)= %d, A054222(%d)= %d, A054223(%d)= %d"%

%o ..............(n,i,n,j,n,k)); n+=1;

%o ......delta += T_j; T_j-=j; j-=1;

%o # _Bert Dobbelaere_, Jan 14 2019

%Y Cf. A054222, A054223.

%K nice,nonn

%O 0,1

%A Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Feb 04 2000

%E More terms from _R. J. Mathar_, Nov 10 2006

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 July 25 02:44 EDT 2024. Contains 374585 sequences. (Running on oeis4.)