A360380 a(n) = number of the diagonal of the Wythoff array, A035513, that includes prime(n). See Comments.
1, 2, 3, 0, 1, 5, -6, -7, -4, 3, -6, -3, -8, -16, 4, -20, -22, -23, -25, -8, -3, -9, -18, 9, -1, -38, -39, -6, -24, -14, -48, -3, -52, -18, -10, -34, 0, -62, -38, -5, -68, -24, -1, -44, -75, 7, -80, -30, -52, -87, 11, -91, -9, -19, -35, -100, -62, -103, -64
Offset: 1
Examples
a(n) = A191360(prime(n)).
Programs
-
Mathematica
w[n_, k_] := Fibonacci[k + 1] Floor[n*GoldenRatio] + (n - 1) Fibonacci[k]; t = Table[w[n - k + 1, k], {n, 300}, {k, n, 1, -1}]; Map[1 + #[[1]] - 2 #[[2]] &, Most[Reap[NestWhile[# + 1 &, 1, Length[Sow[FirstPosition[t, Prime[#]]]] > 1 &]][[2]][[1]]]] (* Peter J. C. Moses, Feb 07 2023 *)
Comments