A356702 Records values in A081120.
1, 2, 4, 6, 8, 14, 18, 20, 22
Offset: 1
Examples
a(9) = 22 since A356700(9) = 3807, and the equation y^2 = x^3 - 3807 has 22 integral solutions.
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.
a(9) = 22 since A356700(9) = 3807, and the equation y^2 = x^3 - 3807 has 22 integral solutions.
(* This naive approach gives correct results up to n = 1000 *) xmax[] = 10^4; Do[xmax[n] = 10^5, {n, {297, 377, 427, 885, 899}}]; Do[xmax[n] = 10^6, {n, {225, 353, 618 }}]; f[n] := (x = -Ceiling[n^(1/3)]-1; s = {}; While[x <= xmax[n], x++; y2 = x^3 + n; If[y2 >= 0, y = Sqrt[y2]; If[ IntegerQ[y], AppendTo[s, y]]]]; s); a[n_] := (fn = f[n]; If[fn == {}, 0, 2 Length[fn] - If[First[fn] == 0, 1, 0] ]); Table[an = a[n]; Print["a[", n, "] = ", an]; an, {n, 1, 100}] (* Jean-François Alcover, Oct 18 2011 *)
m = 99; f[_List] := (xm = 2 xm; ym = Ceiling[xm^(3/2)]; Complement[Range[m], Outer[Plus, -Range[0, ym]^2, Range[-xm, xm]^3] //Flatten //Union]); xm=10; FixedPoint[f, {}] (* Jean-François Alcover, Apr 29 2011 *)
(* Assuming every term is a cube *) xmax = 2000; r[n_] := Reap[Do[rpos = Reduce[y^2 == x^3 - n, y, Integers]; If[rpos =!= False, Sow[rpos]]; rneg = Reduce[y^2 == (-x)^3 - n, y, Integers]; If[rneg =!= False, Sow[rneg]], {x, 1, xmax}]]; ok[1] = True; ok[n_] := Which[rn = r[n]; rn[[2]] === {}, False, Length[rn[[2]]] > 1, False, ! FreeQ[rn[[2, 1]], Or], False, True, True]; ok[n_ /; !IntegerQ[n^(1/3)]] = False; A179163 = Reap[Do[If[ok[n], Print[n]; Sow[n]], {n, 1, 140000}]][[2, 1]] (* Jean-François Alcover, Apr 12 2012 *)
a(1) = A060950(27) = a(729) = 0. - _Jonathan Sondow_, Sep 10 2013
{a(n) = if( n<1, 0, length( ellgenerators( ellinit( [ 0, 0, 0, 0, -n], 1))))} /* Michael Somos, Mar 17 2011 */
apply( {A060951(n)=ellrank(ellinit([0,-n]))[1]}, [1..99]) \\ For version < 2.14, use ellanalyticrank(...). - M. F. Hasler, Jul 01 2024
a = 1,2,4,7,8,11,13,15,18,19,20,23,25,26,27,28,35,39,40,44,45,47,48,49,53, ... b = 0,5,2,1,0, 4,70, 7, 3,18,14, 2,10, 1, 0, 6,36, 5,52, 9,96,13,4,524,26, ... c = 1,3,2,2,2, 3,17, 4, 3, 7, 6, 3, 5, 3, 3, 4,11, 4,14, 5,21, 6, 4,65, 9, ... Here are the values grouped together: {{1, 0, 1}, {2, 5, 3}, {4, 2, 2}, {7, 1, 2}, {8, 0, 2}, {11, 4, 3}, {13, 70, 17}, {15, 7, 4}, {18, 3, 3}, {19, 18, 7}, {20, 14, 6}, {23, 2, 3}, {25, 10, 5}, {26, 1, 3}, {27, 0, 3}, {28, 6, 4}, {35, 36, 11}, {39, 5, 4}, {40, 52, 14}, {44, 9, 5}, {45, 96, 21}, {47, 13, 6}, {48, 4, 4}, {49, 524, 65}, {53, 26, 9}, {54, 17, 7}, {55, 3, 4}, {56, 76, 18}, {60, 2, 4}, {61, 8, 5}, {63, 1, 4}, {64, 0, 4}, {67, 110, 23}, {71, 21, 8}, ... } a(2243) = 10000 = 25^3 - 75^2. - _M. F. Hasler_, Oct 05 2013, index corrected Aug 10 2024 a(136) = 366 = 11815^3 - 1284253^2 (has c/a(n) ~ 32.3); a(939) = 3607 = 244772^3 - 121099571^2 (has c/a(n) ~ 67.9); a(1090) = 4265 = 84521^3 - 24572364^2 (has c/a(n) ~ 19.8). - _M. F. Hasler_, Aug 10 2024
f[n_] := Block[{k = Floor[n^(1/3) + 1]}, While[k < 10^6 && !IntegerQ[ Sqrt[k^3 - n]], k++ ]; If[k == 10^6, 0, k]]; Select[ Range[ 154], f[ # ] != 0 &] (* Robert G. Wilson v, Apr 28 2005 *)
select( {is_A106265(a, L=99)=for(c=sqrtnint(a, 3), (a+9)*L, issquare(c^3-a, &b) && return(c))}, [1..199]) \\ The function is_A106265 returns 0 if n isn't a term, or else the c-value (A106267) which can't be zero if n is a term. The L-value can be used to increase the search limit but so far no instance is known that requires L>68. - M. F. Hasler, Aug 10 2024
y^2 = x^3 + 1 has solutions (y, x) = (0, -1), (1, 0) and (3, 2), hence a(1) = 3. y^2 = x^3 + 6 has no solutions, hence a(6) = 0. y^2 = x^3 + 17 has 8 solutions (see A029727, A029728), hence a(17) = 8. y^2 = x^3 + 27 has solution (y, x) = (0, -3), hence a(27) = 1.
[ #{ Abs(p[2]) : p in IntegralPoints(EllipticCurve([0, n])) }: n in [1..122] ];
(* This naive approach gives correct results up to n=1000 *) xmax[] = 10^4; Do[ xmax[n] = 10^5, {n, {297, 377, 427, 885, 899}}]; Do[ xmax[n] = 10^6, {n, {225, 353, 618}}]; f[n] := (x = -Ceiling[n^(1/3)] - 1; s = {}; While[x <= xmax[n], x++; y2 = x^3 + n; If[y2 >= 0, y = Sqrt[y2]; If[IntegerQ[y], AppendTo[s, y]]]]; s); a[n_] := a[n] = (fn = f[n]; an = If[fn == {}, 0, 2 Length[fn] - If[First[fn] == 0, 1, 0]]; If[EvenQ[an], an/2, (an + 1)/2]); Table[ Print["a[", n, "] = ", a[n] ]; a[n], {n, 1, 105}] (* Jean-François Alcover, Feb 20 2012 *) A081119 = Cases[Import["https://oeis.org/A081119/b081119.txt", "Table"], {, }][[All, 2]]; a[n_] := With[{an = A081119[[n]]}, If[EvenQ[an], an/2, (an + 1)/2]]; a /@ Range[10000] (* Jean-François Alcover, Nov 24 2019 *)
a(1) = 1 = 1^3-0^2 (but this is the only solution to y^3-x^2 = 1). a(2) = 2 = 27-25 (= 3^3-5^2), and this is the only solution to y^3-x^2 = 2. The number 3 is not in the sequence since there are no x, y > 0 such that y^3-x^2 = 3. a(3) = 4 = 8-4 (= 2^3-2^2) = 125-121 (= 5^3-11^2); these are the only two solutions to y^3-x^2 = 4, for all x>11, the minimal positive y^3-x^2 is 7.
Comments