The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104738 Positions of records in A104706. 5

%I #53 Sep 21 2023 19:26:56

%S 1,2,3,5,6,9,11,15,17,21,24,29,30,39,41,51,54,59,66,75,77,87,96,105,

%T 107,120,129,137,141,161,165,180,186,201,209,221,227,249,255,270,285,

%U 306,311,324,336,359,366,390,401,420,435,459,465,495,501,527,534

%N Positions of records in A104706.

%C The entries in this sequence are the same as the partial sums of the independently derived A204539, for reasons unknown at present. - _Colm Fagan_, Jan 23 2012

%H Robert Israel, <a href="/A104738/b104738.txt">Table of n, a(n) for n = 1..5000</a>

%t A104706 = NestList[Rest[Insert[#, #[[1]], 2 + 2 #[[1]]]]&, Range[m = 1000], m][[All, 1]];

%t rec = 0; Reap[For[k = 1, k <= Length[A104706], k++, ak = A104706[[k]]; If[ak > rec, rec = ak; Sow[k]]]][[2, 1]] (* _Jean-François Alcover_, Apr 11 2019, after _Birkas Gyorgy_ in A104706 *)

%o (BASIC) n=n+1; temp1=n^2; for k=(n-1) step -1 to 2; temp2=int(temp1/k); temp1=k*temp2; if int((temp2+k)/2))*2<>(temp2+k) then temp1=temp1-k; next k; a(n-1)=temp1/4 ' _Colm Fagan_, Nov 08 2015

%o (PARI) a(n) = {n++; temp1 = n^2; forstep (k= n-1, 2, -1, temp2 = temp1\k; temp1 = k*temp2; if (((temp2+k)\2)*2 != (temp2+k), temp1 -= k)); temp1/4;} \\ after Basic; _Michel Marcus_, Dec 04 2015

%o (MATLAB)

%o function [ A ] = A104738( N )

%o % Produce a(1) : a(N)

%o M = N;

%o R = [1:M];

%o v = 1;

%o A = 1;

%o count = 1;

%o n = 1;

%o while count < N

%o n = n+1;

%o if 2*R(1)+1 > M

%o R = [R, (M+1):M+N];

%o end

%o R = [R(2:2*R(1)+1), R(1), R((2*R(1)+2) : M)];

%o if R(1) > v

%o A = [A, n];

%o v = R(1);

%o count = count+1;

%o end

%o end

%o end;

%o A104738(100)

%Y Cf. A104706, A104737, A104739, A204539.

%Y See A002491 for a conjectured connection to this sequence.

%K nonn

%O 1,2

%A _Zak Seidov_, Mar 21 2005

%E Extended by _Ray Chandler_, Jan 19 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 08:41 EDT 2024. Contains 372552 sequences. (Running on oeis4.)