Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Nov 24 2024 01:43:22
%S 0,0,0,1,0,1,0,0,2,-1,1,1,0,0,0,2,-1,1,1,-1,1,0,0,2,1,0,1,0,-3,4,0,2,
%T -2,3,-1,0,1,0,0,2,-2,3,0,1,-3,0,3,1,0,0,2,-2,2,0,0,2,-1,1,1,-2,-1,4,
%U 1,0,-3,3,-1,3,0,0,0,1,0,1,0,0,2,-1,0,3,-2
%N a(n) = prime(n-1) - floor((prime(n-2) + prime(n-1) + prime(n)) / 3).
%H Bill McEachen, <a href="/A375010/b375010.txt">Table of n, a(n) for n = 3..10002</a>
%e For n=500001 a(n) = 7368787 - floor((7368743 + 7368787 + 7368791)/3) = 14.
%t seq[len_] := (#[[2]] - Floor[Total[#]/3]) & /@ Partition[Prime[Range[len]], 3, 1]; seq[100] (* _Amiram Eldar_, Jul 27 2024 *)
%K sign,easy
%O 3,9
%A _Bill McEachen_, Jul 27 2024