|
|
A104663
|
|
Position of n in A105822.
|
|
2
|
|
|
1, 2, 3, 6, 4, 11, 8, 5, 26, 9, 12, 7, 15, 17, 33, 43, 10, 25, 16, 19, 13, 32, 39, 21, 61, 175, 22, 20, 57, 37, 95, 14, 18, 50, 27, 40, 34, 110, 29, 24, 171, 23, 64, 28, 46, 203, 45, 31, 137, 91, 134, 35, 58, 30, 90, 54, 69, 106, 38, 73, 360, 296, 67, 88, 48, 70, 526, 109, 124
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Is A105822 a permutation of the positive integers?
|
|
LINKS
|
|
|
MAPLE
|
N:= 1000: # to go up to the first entry missing in A105822(1 .. N)
A:= 'A':
a[1]:= 1: a[2]:= 2:
A[1]:= 1: A[2]:= 2:
for n from 3 to N do
ds:= map(t -> rhs(op(t)), [msolve(x^2=a[n-1]^2, 4*a[n-2])]);
xmin:= infinity;
for d in ds do
found:= false;
for y from floor((a[n-1]-d)/(4*a[n-2]))+1 do
xy:= 4*a[n-2]*y + d;
cand:= (xy^2 - a[n-1]^2)/(4*a[n-2]);
if cand >= xmin then found:= false; break fi;
if not assigned(A[cand]) then found:= true; break fi;
od:
if found then xmin:= cand; fi;
od:
a[n]:= xmin;
A[xmin]:= n;
od:
M:= min(select(t -> not assigned(A[t]), [$1..N+1])):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|