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.

Original entry on oeis.org

1, 13, 8, 0, 23, 2, 46, 0, 20, 8, 116, 0, 163, 18, 218, 6, 281, 32, 352, 0, 431, 50, 518, 0, 28, 72, 14, 0, 827, 98, 946, 0, 1073, 128, 1208, 0, 1351, 162, 1502, 0, 1661, 200, 1828, 0, 53, 242, 2186, 98, 32, 43, 2576, 0, 2783, 36, 2998, 0, 3221, 392, 3452, 0, 3691, 450
Offset: 1

Views

Author

Amarnath Murthy, Oct 09 2002

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local y,F,t,k,v;
          if n::odd then
             F:= ifactors(n)[2];
             y:= mul(t[1]^ceil(t[2]/3),t=F);
             k:= 1+floor((n*(n-1)/2)^(1/3)/y);
             (k*y)^3/n - (n-1)/2;
          else
             v:= padic:-ordp(n,2);
             if v mod 3 <> 1 then return 0 fi;
             F:= ifactors(n/2^v)[2];
             y:= mul(t[1]^ceil(t[2]/3),t=F)*2^((v-1)/3);
             k:= 1 + floor((n*(n-1)/2)^(1/3)/y);
             if k::even then k:= k+1 fi;
             (k*y)^3/n - (n-1)/2;
          fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 15 2023
  • Mathematica
    f[n_] := Module[{y, F, t, k, v},
    If[OddQ[n],
       F = FactorInteger[n];
       y = Product[t[[1]]^Ceiling[t[[2]]/3], {t, F}];
       k = 1 + Floor[(n*(n-1)/2)^(1/3)/y];
       (k*y)^3/n - (n-1)/2
    ,
       v = IntegerExponent[n, 2];
       If[Mod[v, 3] != 1, Return[0]];
       F = FactorInteger[n/2^v];
       y = Product[t[[1]]^Ceiling[t[[2]]/3], {t, F}]*2^((v-1)/3);
       k = 1 + Floor[(n*(n-1)/2)^(1/3)/y];
       If[EvenQ[k], k = k+1];
       (k*y)^3/n - (n-1)/2]];
    Map[f, Range[100]] (* Jean-François Alcover, Jul 09 2024, after Robert Israel *)

Formula

From Robert Israel, Nov 15 2023: (Start)
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.
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)

Extensions

More terms from David Wasserman, Apr 02 2005