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!)
A172999 a(1)=1, a(2)=4; for n>=3, a(n) is the smallest number larger than a(n-1) such that, for every k<n, a(n) is relatively prime to a(k) iff n is relatively prime to k. 4
1, 4, 5, 6, 7, 10, 11, 12, 25, 28, 29, 30, 31, 44, 175, 178, 179, 180, 181, 182, 275, 348, 349, 360, 371, 372, 395, 396, 397, 420, 421, 422, 725, 1074, 1309, 1310, 1319, 1448, 2945, 2954, 2957, 2970, 2971, 3016, 3325, 4188, 4189, 4190, 4213, 4214, 4475, 4526 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
a:= proc(n) option remember;
local ok, m, k;
if n<3 then 3*n-2
else for m from a(n-1)+1 do
ok:= true;
for k from 1 to n-1 do
if igcd(n, k)=1 xor igcd(m, a(k))=1
then ok:= false; break fi
od;
if ok then break fi
od; m
fi
end:
seq (a(n), n=1..50); # Alois P. Heinz, Nov 21 2010
MATHEMATICA
t={1, 4}; Do[nxt=t[[-1]]+1; While[CoprimeQ[n, Range[n-1]] != CoprimeQ[nxt, t], nxt++]; AppendTo[t, nxt], {n, 3, 50}]; t
CROSSREFS
Sequence in context: A255137 A047260 A284790 * A354489 A284371 A123438
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 21 2010
EXTENSIONS
More terms from Alois P. Heinz, Nov 21 2010
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 April 19 06:44 EDT 2024. Contains 371782 sequences. (Running on oeis4.)