login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A340510 A permutation of the positive integers with a divisibility property (see Comments for precise definition). 4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(1)=1; thereafter a(n) is the least positive number not yet in the sequence such that Sum_{i=1..n} a(i) == 1 mod n+1.
LINKS
Muharem Avdispahić and Faruk Zejnulahi, An integer sequence with a divisibility property, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.
FORMULA
Theorem 1 of Avdispahić and Zejnulahi gives an explicit formula involving Fibonacci numbers.
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 *)
CROSSREFS
Sequence in context: A282348 A026193 A026143 * A075626 A152649 A327263
KEYWORD
nonn,hear
AUTHOR
N. J. A. Sloane, Jan 28 2021
EXTENSIONS
More terms from Alois P. Heinz, Jan 28 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)