OFFSET
1,3
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Alternative scatterplot of A284374
Altug Alkan, Alternative graph of A284374
FORMULA
a(1) = a(2) = 1; a(n) = A007917(a(n-a(n-1)) + a(n-a(n-2))) for n > 2.
EXAMPLE
a(4) = 3 because a(4 - a(3)) + a(4 - a(2)) = a(2) + a(3) = 1 + 2 = 3 and A007917(3) = 3.
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = Prime@ PrimePi[a[n - a[n - 1]] + a[n - a[n - 2]]]; Array[a, 73] (* Michael De Vlieger, Mar 25 2017 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n] = precprime(a[n-a[n-1]]+a[n-a[n-2]])); a
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 25 2017
STATUS
approved