The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349472 a(1)=1; for n > 1, a(n) is the smallest unused positive number such that gcd(a(n-1)+n,a(n)) > 1. 6
1, 3, 2, 4, 6, 8, 5, 13, 10, 12, 23, 7, 14, 16, 31, 47, 18, 9, 20, 15, 21, 43, 11, 25, 22, 24, 17, 27, 26, 28, 59, 35, 30, 32, 67, 103, 34, 33, 36, 19, 38, 40, 83, 127, 42, 44, 39, 29, 45, 50, 101, 48, 202, 46, 303, 359, 52, 54, 113, 173, 51, 226, 68, 55, 56, 58, 60, 62, 131, 57, 64, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
After 200000 terms the smallest unused number is 28349, although like similar sequences this is almost certainly a permutation of the positive integers. In the same range the fixed points are 4, 21, 50, 1269; it is likely no more exist. See the linked image.
LINKS
Scott R. Shannon, Image of the first 200000 terms. The green line is y = n.
EXAMPLE
a(2) = 3 as a(1) + 2 = 3, 3 has not previously appeared, and gcd(3,3) > 1.
a(3) = 2 as a(2) + 3 = 6, 2 has not previously appeared, and gcd(6,2) > 1.
a(12) = 7 as a(11) + 12 = 35, 7 has not previously appeared, and gcd(35,7) > 1.
MATHEMATICA
nn = 72; c[_] = False; u = 2; a[1] = j = 1; c[1] = True; Do[Set[{k, m}, {u, n + j}]; While[Or[c[k], CoprimeQ[k, m]], k++]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 05 2022 *)
PROG
(Python)
from math import gcd
terms, appears = [1], {}
for n in range(2, 100):
t = 2
while True:
if appears.get(t) is None and gcd(terms[-1]+n, t) > 1 :
appears[t] = True; terms.append(t); break
t += 1
print(terms) # Gleb Ivanov, Nov 19 2021
CROSSREFS
Sequence in context: A371173 A105746 A166309 * A195208 A114651 A340064
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Nov 19 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 11:40 EDT 2024. Contains 373173 sequences. (Running on oeis4.)