login
A117534
Inverse permutation to sequence A117532 (if indeed sequence A117532 is a permutation of the positive integers).
3
1, 2, 5, 3, 9, 4, 6, 7, 13, 8, 10, 11, 16, 12, 14, 19, 15, 17, 21, 18, 25, 20, 22, 23, 28, 24, 26, 31, 27, 29, 33, 30, 37, 32, 34, 35, 40, 36, 38, 43, 39, 41, 45, 42, 49, 44, 46, 47, 52, 48, 50, 55, 51, 53, 57, 54, 61, 56, 58, 59, 62, 63, 65, 60, 69, 64, 66, 67, 73, 68, 70, 71
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
Sequence in context: A332354 A159988 A134880 * A256628 A112990 A169848
KEYWORD
nonn,changed
AUTHOR
Leroy Quet, Mar 26 2006
EXTENSIONS
More terms from R. J. Mathar, Jul 20 2009
STATUS
approved