OFFSET
1,2
LINKS
FORMULA
a(2*n) = A000124(n).
a(p) < a(n) if p < n with p a prime number.
EXAMPLE
A076034(42) = 101, so a(101) = 42.
MAPLE
S:=[$1..10000]:
V:= Vector(10000): ok:= true;
for n from 1 while ok do
A:= [S[1]]; R:= 1; count:= 1;
for k from 2 while count < n do
if k > nops(S) then ok:= false; break fi;
if andmap(t -> igcd(t, S[k])=1, A) then count:= count+1; A:= [op(A), S[k]]; R:= R, k; fi
od;
S:= subsop(op(map(t -> t=NULL, [R])), S);
for i from 1 to nops(A) do
V[A[i]]:= n*(n-1)/2+i
od
od:
if member(0, V, 'q') then convert(V[1..q-1], list)
else convert(V, list)
fi; # Robert Israel, Dec 04 2022
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Dec 04 2022
STATUS
approved