login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the largest possible integer value for sqrt(0 _ 1 _ 2 _ ... _ n), where one is allowed to place any mixture of +'s and *'s in the n blank spaces.
1

%I #19 Jun 25 2018 02:57:35

%S 1,0,0,5,11,6,71,19,123,33,174,426,174,233,625,816,5695,3656,15936,

%T 246960,24234,24234,35151,140604,177399,250982,1304130,1304130,

%U 1304130,1304130,5532955,5532955,58136459,8525544,8525544,58136459,941988492,58136459,941988492

%N a(n) is the largest possible integer value for sqrt(0 _ 1 _ 2 _ ... _ n), where one is allowed to place any mixture of +'s and *'s in the n blank spaces.

%C Inspired by a test ARML problem from 2018, which asked students to determine a(8).

%H Rémy Sigrist, <a href="/A304935/a304935.gp.txt">PARI program for A304935</a>

%e a(2) = a(3) = 0, since no positive squares are achievable.

%e Some examples:

%e a(7) = 71 = sqrt(0+1+2*3*4*5*6*7).

%e a(8) = 19 = sqrt(0+1*2+3+4*5+6*7*8).

%e a(20) = 246960 = sqrt(0+1*2*3*4*5*6*7*8*9*10*11+12*13*14*15*16*17*18*19*20)

%t sqStrTest[n_] := Module[{bVal, bStr, i, j, iB, mVal, mStr},

%t bVal = -1;

%t For[i = 0, i < 2^n, i++,

%t iB = IntegerDigits[i, 2];

%t While[Length[iB] < n, PrependTo[iB, 0]];

%t mStr = "0";

%t For[j = 1, j <= n, j++,

%t mStr = StringJoin[mStr, If[iB[[j]] == 0, "+", "*"], ToString[j]]];

%t mVal = ToExpression[mStr];

%t If[Sqrt[mVal] == Floor[Sqrt[mVal]],

%t If[mVal > bVal, {bVal, bStr} = {mVal, mStr}]

%t ]

%t ];

%t Print[{Sqrt[bVal], bVal, bStr}]]

%o (PARI) See Links section.

%Y Upper-bounded by sqrt(A038507).

%K nonn

%O 1,4

%A _Andy Niedermaier_, May 21 2018

%E More terms from _Rémy Sigrist_, May 22 2018