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.

A076116 Start of the smallest string of n consecutive positive numbers with a cube sum, or 0 if no such number exists.

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