login
a(n) = number of the diagonal of the Wythoff array, A035513, that includes prime(n). See Comments.
3

%I #11 Feb 08 2023 21:32:33

%S 1,2,3,0,1,5,-6,-7,-4,3,-6,-3,-8,-16,4,-20,-22,-23,-25,-8,-3,-9,-18,9,

%T -1,-38,-39,-6,-24,-14,-48,-3,-52,-18,-10,-34,0,-62,-38,-5,-68,-24,-1,

%U -44,-75,7,-80,-30,-52,-87,11,-91,-9,-19,-35,-100,-62,-103,-64

%N a(n) = number of the diagonal of the Wythoff array, A035513, that includes prime(n). See Comments.

%C The indexing of diagonals is given in A191360. Conjecture: every integer occurs infinitely many times in this sequence; i.e., every diagonal includes infinitely many primes.

%e a(n) = A191360(prime(n)).

%t w[n_, k_] := Fibonacci[k + 1] Floor[n*GoldenRatio] + (n - 1) Fibonacci[k];

%t t = Table[w[n - k + 1, k], {n, 300}, {k, n, 1, -1}];

%t Map[1 + #[[1]] - 2 #[[2]] &, Most[Reap[NestWhile[# + 1 &, 1,

%t Length[Sow[FirstPosition[t, Prime[#]]]] > 1 &]][[2]][[1]]]]

%t (* _Peter J. C. Moses_, Feb 07 2023 *)

%Y Cf. A000040, A035513, A191360, A332938, A360376, A360377, A360378, A360379.

%K easy,sign

%O 1,2

%A _Clark Kimberling_, Feb 07 2023