%I #20 Jul 09 2024 08:41:57
%S 1,13,8,0,23,2,46,0,20,8,116,0,163,18,218,6,281,32,352,0,431,50,518,0,
%T 28,72,14,0,827,98,946,0,1073,128,1208,0,1351,162,1502,0,1661,200,
%U 1828,0,53,242,2186,98,32,43,2576,0,2783,36,2998,0,3221,392,3452,0,3691,450
%N Start of the smallest string of n consecutive positive numbers with a cube sum, or 0 if no such number exists.
%H Robert Israel, <a href="/A076116/b076116.txt">Table of n, a(n) for n = 1..10000</a>
%F From _Robert Israel_, Nov 15 2023: (Start)
%F If n is odd, then a(n) is the least positive integer of the form (k*A019555(n))^3/n - (n-1)/2 where k is an integer.
%F If n is even, then let v = A007814(n). If v == 1 (mod 3) then a(n) is the least positive integer of the form (k*A019555(n/2))^3/n - (n-1)/2 where k an odd integer; otherwise, a(n) = 0. (End)
%p f:= proc(n) local y,F,t,k,v;
%p if n::odd then
%p F:= ifactors(n)[2];
%p y:= mul(t[1]^ceil(t[2]/3),t=F);
%p k:= 1+floor((n*(n-1)/2)^(1/3)/y);
%p (k*y)^3/n - (n-1)/2;
%p else
%p v:= padic:-ordp(n,2);
%p if v mod 3 <> 1 then return 0 fi;
%p F:= ifactors(n/2^v)[2];
%p y:= mul(t[1]^ceil(t[2]/3),t=F)*2^((v-1)/3);
%p k:= 1 + floor((n*(n-1)/2)^(1/3)/y);
%p if k::even then k:= k+1 fi;
%p (k*y)^3/n - (n-1)/2;
%p fi
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Nov 15 2023
%t f[n_] := Module[{y, F, t, k, v},
%t If[OddQ[n],
%t F = FactorInteger[n];
%t y = Product[t[[1]]^Ceiling[t[[2]]/3], {t, F}];
%t k = 1 + Floor[(n*(n-1)/2)^(1/3)/y];
%t (k*y)^3/n - (n-1)/2
%t ,
%t v = IntegerExponent[n, 2];
%t If[Mod[v, 3] != 1, Return[0]];
%t F = FactorInteger[n/2^v];
%t y = Product[t[[1]]^Ceiling[t[[2]]/3], {t, F}]*2^((v-1)/3);
%t k = 1 + Floor[(n*(n-1)/2)^(1/3)/y];
%t If[EvenQ[k], k = k+1];
%t (k*y)^3/n - (n-1)/2]];
%t Map[f, Range[100]] (* _Jean-François Alcover_, Jul 09 2024, after _Robert Israel_ *)
%Y Cf. A007814, A019555, A076117, A076114.
%K nonn,look
%O 1,2
%A _Amarnath Murthy_, Oct 09 2002
%E More terms from _David Wasserman_, Apr 02 2005