OFFSET
1,3
COMMENTS
It is conjectured that for all n, a(n) = 0 implies that 8n+7 = a(n+1) is prime, cf. A186260. (This is the sequence {u(n)} mentioned there.)
EXAMPLE
a(2) = a(1) - gcd(a(1),8+7) = 1 - 1 = 0.
a(3) = |a(2) - gcd(a(2),8*2+7)| = gcd(0,23) = 23 (= A186260(1)) is prime.
a(6) = 20 and 8*6+7 = 55, thus a(7) = 20 - gcd(20,55) = 20 - 5 = 15.
a(8) = 15 - gcd(15,8*7+7) = 15 - 3 = 12. Note that for n = 8 + a(8) = 20, we have that 8n+7 = 167 = a(20+1) = A186260(2) is prime, while for n = 3 + a(3) = 26, 8n+7 = 215 was divisible by 5, and for n = 7 + a(7) = 22, 8n+7 = 183 was divisible by 3.
PROG
(PARI) print1(a=1); for(n=1, 99, print1(", ", a=abs(a-gcd(a, 8*n+7))))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Aug 14 2015
STATUS
approved