The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A261307 a(n+1) = abs(a(n) - gcd(a(n), 7*n+6)), a(1) = 1. 2
 1, 0, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS It is conjectured that for all n > 2, a(n) = 0 implies that 7n+6 = a(n+1) is prime, cf. A186259. (This is the sequence {u(n)} mentioned there.) LINKS Harvey P. Dale, Table of n, a(n) for n = 1..1000 EXAMPLE a(2) = a(1) - gcd(a(1),7+6) = 1 - 1 = 0. a(3) = |a(2) - gcd(a(2),7*2+6)| = gcd(0,17) = 17 is prime. a(33) = 158, thus a(6) = 158 - gcd(158,7*33+6) = 158 - 79 = 79. MATHEMATICA nxt[{n_, a_}]:={n+1, Abs[a-GCD[a, 7n+6]]}; NestList[nxt, {1, 1}, 80][[All, 2]] (* Harvey P. Dale, Apr 26 2017 *) PROG (PARI) print1(a=1); for(n=1, 99, print1(", ", a=abs(a-gcd(a, 7*n+6)))) CROSSREFS Cf. A261301 - A261310, A186253 - A186263, A106108. Sequence in context: A248942 A022976 A023462 * A172164 A267058 A205545 Adjacent sequences:  A261304 A261305 A261306 * A261308 A261309 A261310 KEYWORD nonn AUTHOR M. F. Hasler, Aug 14 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 17 05:55 EDT 2021. Contains 345080 sequences. (Running on oeis4.)