OFFSET
1,2
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Scatterplot of n-2*a(n)
Altug Alkan, Plot of a(n)/n
FORMULA
a(1) = 1, a(2) = 2; a(n) = A007917(a(a(n-1)) + a(n-a(n-1))) for n > 2.
EXAMPLE
a(6) = 5 because a(a(5)) + a(6 - a(5)) = a(5) + a(1) = 5 + 1 = 6 and A007917(6) = 5
PROG
(PARI) a=vector(1000); a[1]=1; a[2]=2; for(n=3, #a, a[n] = precprime(a[a[n-1]]+a[n-a[n-1]])); a
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 26 2017
STATUS
approved