%I #10 Jan 01 2021 17:46:35
%S 0,2,6,22,182,490,3510,9240,63868,1149468,3009672,54017304,370246314,
%T 969319296,6643832358,119218840092,2139295466336,5600748260454,
%U 100501350226466,688846502491240,1803423556642478,32361122671978600,221806434537503870,3980154972736116440
%N Lucas(prime(n+1)) - prime(Lucas(n)), for Lucas numbers beginning at 2.
%C Commutator of Primes and Lucas numbers. Some subtlety in indexing -- should we start with 0th Lucas number is 2, and 0th prime is 1? As shown here, I use "first" to mean the initial value as shown in P(n) and L(n), even though their indexing differs. This is to A093062 Fibonacci(prime(i))-prime(Fibonacci(i)) as Fibonacci is to Lucas.
%H Harvey P. Dale, <a href="/A180367/b180367.txt">Table of n, a(n) for n = 0..50</a>
%F a(n) = L(prime(n+1)) - prime(L(n)) = A000032(A000040(n+1)) - A000040(A000032(n)) = A180363(n+1) - A094894(n).
%e a(0) = 0 because the 1st prime is 2, and the third Lucas number is A000032(2) = 3; while the 1st Lucas number is 2, and the 2nd prime is 3; with 3-3=0.
%e a(1) = 2 because the 2nd prime is 3, and A000032(3) = 4; while the 2nd Lucas number is 1, and the first2 prime is 2; with 4-2=2.
%e a(2) = 6 because the 3rd prime is 5, and the 6th Lucas number (counting "2" as first) is A000032(5) = 11; while the 3rd Lucas number is 3, and the 3rd prime is 5; with 11-5=6.
%e a(3) = 29 - 7 = 22. a(4) = 199 - 17 = 182.
%p A000032 := proc(n) option remember; if n <= 1 then op(n+1,[2,1]) ; else procname(n-1)+procname(n-2) ; end if; end proc:
%p A094894 := proc(n) ithprime(A000032(n)) ; end proc:
%p A180363 := proc(n) A000032(ithprime(n)) ; end proc:
%p A180367 := proc(n) A180363(n+1)-A094894(n) ; end proc: seq(A180367(n),n=0..25) ; # _R. J. Mathar_, Sep 01 2010
%t Table[LucasL[Prime[n+1]]-Prime[LucasL[n]],{n,0,30}] (* _Harvey P. Dale_, Jan 01 2021 *)
%Y Cf. A000032, A000040, A094894, A180363, A093062.
%K easy,nonn
%O 0,2
%A _Jonathan Vos Post_, Aug 31 2010
%E Some indices corrected, 3 values corrected, formulas signs swapped - _R. J. Mathar_, Sep 01 2010