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!)
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
7, 8, 10, 23, 27, 48, 64, 125, 199, 216, 343, 512, 621, 729, 978, 1000, 1222, 1331, 1728, 2197, 2744, 3375, 3563, 4034, 4096, 4331, 4913, 5017, 5832, 6442, 6859, 6886, 7783, 8000, 8699, 9261, 10648, 11157, 12167, 12287, 12386, 13824, 15625, 17576, 19683 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Sequence contains all positive cubes, since binomial(n+2,3)-binomial(n,3)=n^2. j values are A054222 and k values are A054223.
LINKS
Bert Dobbelaere, Table of n, a(n) for n = 0..271 (terms 0..84 from Joerg Arndt)
EXAMPLE
binomial(7+2,3)=84=binomial(4+2,3)+4^3; binomial(8+2,3)=120=binomial(6+2,3)+4^3;
MATHEMATICA
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 *)
PROG
(C)
#include <stdio.h>
#include <limits.h>
#include <math.h>
typedef unsigned long long ULL;
unsigned A000578inv(ULL n)
{
ULL n3 = (ULL)cbrt((double)n) ;
for (ULL k= n3-1 ; k <= n3+1 ; k++)
if ( k*k*k == n) return k;
return 0 ;
}
int main(int argc, char *argv[])
{
const ULL imax = cbrt((double)ULLONG_MAX)-2. ;
for(unsigned i=1; i<imax; i++)
{
ULL i3 = i*(ULL)(i+1)*(ULL)(i+2) ;
for(unsigned j=1 ; j < i ; j++)
{ ULL k3 = i3- j*(ULL)(j+1)*(ULL)(j+2) ;
if( k3 % 6 == 0)
{
unsigned k=A000578inv(k3/6) ;
if ( k ) { printf("%d, ", i) ; fflush(stdout) ; }
}
}
}
}
// R. J. Mathar, Nov 10 2006
(Python)
# Algorithm without multiplications nor divisions.
n=0; i=0; T_i=0
while i<100000:
..j=i; i+=1; k=1; kd2=1; kd3=0; T_j=T_i; delta=T_j+j; T_i+=i;
..while j>0:
....if delta>0:
......kd3+=6; kd2+=kd3; delta-=kd2; k+=1;
....else:
......if delta==0:
........print("A054221(%d)= %d, A054222(%d)= %d, A054223(%d)= %d"%
..............(n, i, n, j, n, k)); n+=1;
......delta += T_j; T_j-=j; j-=1;
# Bert Dobbelaere, Jan 14 2019
CROSSREFS
Sequence in context: A286420 A111064 A071117 * A195240 A253318 A277026
KEYWORD
nice,nonn
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Feb 04 2000
EXTENSIONS
More terms from R. J. Mathar, Nov 10 2006
STATUS
approved

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 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)