

A372748


a(1) = 3; for n > 1, a(n) = a(n  1) if GCD(n  1, a(n  1)) = 1, otherwise a(n) = n  1  a(n  1) / GCD(n  1, a(n  1)).


1



3, 3, 3, 2, 3, 3, 5, 5, 5, 5, 9, 9, 9, 9, 9, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 61, 61, 61, 61, 61, 61, 61, 61
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

a(n) = n/2 for n from {4,6,10,26,62,122,298,626,1094,2186,...}.


LINKS



EXAMPLE

a(1) = 3.
a(2) = 3 because GCD(1,3) = 1.
a(3) = 3 because GCD(2,3) = 1.
a(4) = 3  3/GCD(3,3) = 2.
and so on.


MATHEMATICA

Block[{n = 0}, NestList[If[CoprimeQ[++n, #], #, n  #/GCD[n, #]] &, 3, 100]] (* Paolo Xausa, May 12 2024 *)


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



