OFFSET
1,2
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..3000
MAPLE
read("transforms") ; A117532 := proc(nmax) local a, n, nxt, asu ; a := [1] ; asu := 1 ; while nops(a) < nmax do n := nops(a)+1 ; nxt := 1 ; while nxt in a or gcd(n, asu+nxt) <> 1 do nxt := nxt+1 ; od ; a := [op(a), nxt] ; asu := asu+nxt ; od ; a ; end: A117532(180) ; INVERSE(%) ; # R. J. Mathar, Jul 20 2009
MATHEMATICA
(* b(n) is A117532 *)
nmaxa = 72; nmaxb = nmaxa + 3;
(* nmaxb can be increased in case less than nmaxa terms are produced *)
b[n_] := b[n] = If[n == 1, 1, bb = Array[b, n-1]; For[k = 2, True, k++, If[FreeQ[bb, k] && CoprimeQ[n, Total[bb]+k], Return[k]]]];
Do[a[b[n]] = n, {n, 1, nmaxb}];
TakeWhile[Table[a[n], {n, 1, nmaxa}], IntegerQ] (* Jean-François Alcover, Nov 18 2024 *)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Leroy Quet, Mar 26 2006
EXTENSIONS
More terms from R. J. Mathar, Jul 20 2009
STATUS
approved