A340510 A permutation of the positive integers with a divisibility property (see Comments for precise definition).
1, 3, 5, 2, 8, 10, 4, 13, 15, 6, 18, 7, 21, 23, 9, 26, 28, 11, 31, 12, 34, 36, 14, 39, 41, 16, 44, 17, 47, 49, 19, 52, 20, 55, 57, 22, 60, 62, 24, 65, 25, 68, 70, 27, 73, 75, 29, 78, 30, 81, 83, 32, 86, 33, 89, 91, 35, 94, 96, 37, 99, 38, 102, 104, 40, 107, 109
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- Muharem Avdispahić and Faruk Zejnulahi, An integer sequence with a divisibility property, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.
- J. Shallit, Proving properties of some greedily-defined integer recurrences via automata theory, arXiv:2308.06544 [cs.DM], August 12 2023.
Programs
-
Maple
A000045_inv := proc(n) local k ; for k from 0 do if combinat[fibonacci](k) = n then return k; elif combinat[fibonacci](k) > n then return -1; end if; end do: end proc: A000071_inv := proc(n) local k ; for k from 0 do if combinat[fibonacci](k)-1 = n then return k; elif combinat[fibonacci](k)-1 > n then return -1; end if; end do: end proc: A000201_inv := proc(n) local k,w ; for k from 1 do w := floor(k*(1+sqrt(5))/2) ; if w = n then return k; elif w > n then return -1; end if; end do: end proc: A001950_inv := proc(n) local k,w ; for k from 1 do w := floor(k*(3+sqrt(5))/2) ; if w = n then return k; elif w > n then return -1; end if; end do: end proc: A340510 := proc(n) local k ; if n = 1 then 1; else k := A000045_inv(n) ; if k > 2 then return combinat[fibonacci](k+1) ; end if; k := A000071_inv(n) ; if k > 4 then return combinat[fibonacci](k-1)-1 ; end if; k := A000201_inv(n) ; if k > 0 then return floor(k*(3+sqrt(5))/2) ; end if; k := A001950_inv(n) ; return floor(k*(1+sqrt(5))/2) ; end if; end proc: seq(A340510(n),n=1..50) ; # R. J. Mathar, Jan 30 2024
-
Mathematica
a[n_] := a[n] = Switch[n, 1, 1, 2, 3, 3, 5, 4, 2, _, Module[{aa, ss, dd, an}, aa = Array[a, n-1]; ss = Sort[aa]; dd = Differences[ss]; For[an = Select[Transpose[{Rest[ss], dd}], #[[2]] == 1 &][[-1, 1]]+1, True, an++, If[FreeQ[aa = Array[a, n-1], an], If[Mod[Total[aa] + an, n+1] == 1, Return[an]]]]]]; Table[Print[n, " ", a[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 31 2021 *)
Formula
Theorem 1 of Avdispahić and Zejnulahi gives an explicit formula involving Fibonacci numbers.
Extensions
More terms from Alois P. Heinz, Jan 28 2021
Comments