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.

A025397 Numbers that are the sum of 3 positive cubes in exactly 3 ways.

This page as a plain text file.
%I A025397 #31 Jul 31 2021 23:41:24
%S A025397 5104,9729,12104,12221,12384,14175,17604,17928,19034,20691,21412,
%T A025397 21888,24480,28792,29457,30528,31221,32850,34497,35216,36288,38259,
%U A025397 39339,39376,40060,40097,40832,40851,41033,41040,41364,41966,42056,42687,43408,45144
%N A025397 Numbers that are the sum of 3 positive cubes in exactly 3 ways.
%H A025397 Donovan Johnson, <a href="/A025397/b025397.txt">Table of n, a(n) for n = 1..10000</a>
%F A025397  n such that A025456(n) = 3. - _Robert Israel_, Aug 28 2015
%p A025397 N:= 10^5: # to get all terms <= N
%p A025397 Reps:= Matrix(N,3,(i,j) -> {}):
%p A025397 for i from 1 to floor(N^(1/3)) do
%p A025397   Reps[i^3,1]:= {[i]}
%p A025397 od:
%p A025397 for j from 2 to 3 do
%p A025397 for i from 1 to floor(N^(1/3)) do
%p A025397   for x from i^3+1 to N do
%p A025397     Reps[x,j]:= Reps[x,j] union
%p A025397       map(t -> if t[-1] <= i then [op(t),i] fi, Reps[x-i^3,j-1]);
%p A025397   od
%p A025397 od
%p A025397 od:
%p A025397 select(t -> nops(Reps[t,3])=3, [$1..N]); # _Robert Israel_, Aug 28 2015
%t A025397 Reap[ For[ n = 1, n <= 50000, n++, pr = Select[ PowersRepresentations[n, 3, 3], Times @@ # != 0 &]; If[pr != {} && Length[pr] == 3, Print[n, pr]; Sow[n]]]][[2, 1]] (* _Jean-François Alcover_, Jul 31 2013 *)
%o A025397 (PARI) is(n)=k=ceil((n-2)^(1/3)); d=0; for(a=1, k, for(b=a, k, for(c=b, k, if(a^3+b^3+c^3==n, d++)))); d
%o A025397 n=3; while(n<50000, if(is(n)==3, print1(n, ", ")); n++) \\ _Derek Orr_, Aug 27 2015
%Y A025397 Cf. A008917, A025323, A025396, A025398, A025405, A025456, A343969, A344240, A344804.
%K A025397 nonn
%O A025397 1,1
%A A025397 _David W. Wilson_