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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333111 a(n) is the least positive integer not used earlier such that n+1 and the sum of terms up to a(n) are coprime. 0
1, 3, 5, 2, 6, 7, 9, 4, 10, 11, 13, 8, 14, 16, 12, 17, 19, 15, 21, 18, 22, 23, 25, 20, 26, 28, 24, 29, 31, 27, 33, 30, 34, 35, 37, 32, 38, 40, 36, 41, 43, 39, 45, 42, 46, 47, 49, 44, 50, 52, 48, 53, 55, 51, 57, 54, 58, 59, 63, 56, 60, 61, 65, 62, 66, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Conjectured to be a permutation of the positive integers.

LINKS

Table of n, a(n) for n=1..66.

EXAMPLE

We start with a(1) = 1. To find a(2), we need the earliest positive integer such that a(1) + a(2) is coprime to 3. So, a(2) = 3. To find a(3), we can use neither 2 nor 4, because 6 and 8 have a common factor with 4, so we use a(3) = 5.

PROG

(PARI) A333111_vec(N, a=Vec(1, N), s=1, u=1)={ for(n=2, N, u+=1<<a[n-1]; for(k=valuation(u+1, 2), oo, bittest(u, k) || gcd(s+k, n+1)>1 || [s+=a[n]=k, break])); a}

CROSSREFS

Sequence in context: A016657 A302793 A010782 * A139584 A064790 A113966

Adjacent sequences:  A333108 A333109 A333110 * A333112 A333113 A333114

KEYWORD

nonn

AUTHOR

Ali Sada and M. F. Hasler, Mar 07 2020

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 18 05:18 EST 2021. Contains 340250 sequences. (Running on oeis4.)