

A104738


Positions of records in A104706.


5



1, 2, 3, 5, 6, 9, 11, 15, 17, 21, 24, 29, 30, 39, 41, 51, 54, 59, 66, 75, 77, 87, 96, 105, 107, 120, 129, 137, 141, 161, 165, 180, 186, 201, 209, 221, 227, 249, 255, 270, 285, 306, 311, 324, 336, 359, 366, 390, 401, 420, 435, 459, 465, 495, 501, 527, 534
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

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


LINKS

Robert Israel, Table of n, a(n) for n = 1..5000


MATHEMATICA

A104706 = NestList[Rest[Insert[#, #[[1]], 2 + 2 #[[1]]]]&, Range[m = 1000], m][[All, 1]];
rec = 0; Reap[For[k = 1, k <= Length[A104706], k++, ak = A104706[[k]]; If[ak > rec, rec = ak; Sow[k]]]][[2, 1]] (* JeanFrançois Alcover, Apr 11 2019, after Birkas Gyorgy in A104706 *)


PROG

(Basic) n=n+1; temp1=n^2; for k=(n1) step 1 to 2; temp2=int(temp1/k); temp1=k*temp2; if int((temp2+k)/2))*2<>(temp2+k) then temp1=temp1k; next k; a(n1)=temp1/4 ' Colm Fagan, Nov 08 2015
(PARI) a(n) = {n++; temp1 = n^2; forstep (k= n1, 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
(MATLAB)
function [ A ] = A104738( N )
% Produce a(1) : a(N)
M = N;
R = [1:M];
v = 1;
A = 1;
count = 1;
n = 1;
while count < N
n = n+1;
if 2*R(1)+1 > M
R = [R, (M+1):M+N];
end
R = [R(2:2*R(1)+1), R(1), R((2*R(1)+2) : M)];
if R(1) > v
A = [A, n];
v = R(1);
count = count+1;
end
end
end;
A104738(100)


CROSSREFS

Cf. A104706, A104737, A104739, A204539.
See A002491 for a conjectured connection to this sequence.
Sequence in context: A054639 A123399 A239010 * A319469 A341123 A325863
Adjacent sequences: A104735 A104736 A104737 * A104739 A104740 A104741


KEYWORD

nonn


AUTHOR

Zak Seidov, Mar 21 2005


EXTENSIONS

Extended by Ray Chandler, Jan 19 2012


STATUS

approved



