|
|
A214053
|
|
Least m>0 such that floor(n*r)+m and n-m have a common divisor > 1, where r = (1+sqrt(5))/2, the golden ratio.
|
|
1
|
|
|
1, 2, 3, 2, 5, 1, 1, 2, 9, 2, 1, 12, 1, 2, 2, 16, 1, 18, 5, 2, 1, 1, 1, 2, 5, 2, 1, 28, 2, 2, 1, 32, 1, 34, 7, 2, 1, 2, 1, 1, 41, 42, 1, 4, 3, 1, 2, 3, 1, 2, 2, 1, 1, 3, 3, 2, 57, 58, 1, 60, 1, 2, 1, 64, 1, 2, 2, 2, 1, 1, 1, 2, 73, 74, 1, 1, 2, 2, 1, 3, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
floor(4*r) = A000201(4) = 6; gcd(6+1,4-1) = 1 and gcd(6+2,4-2) = 2, so a(4) = 2.
|
|
MATHEMATICA
|
a[n_] := NestWhile[# + 1 &, 1, CoprimeQ[Floor[GoldenRatio*n] + #, n - #] &] (* Sidney Cadot, Feb 19 2023 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|