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!)
A076607 a(0)=1 and for n>0: a(n) = if gcd(a(n-1),n)>1 then lcm(a(n-1),n) else a(n-1)+n. 1

%I #7 Apr 18 2019 16:52:10

%S 1,2,2,5,9,14,42,42,168,504,2520,2531,2543,2556,17892,89460,357840,

%T 357857,357875,357894,3578940,25052580,275578380,275578403,275578427,

%U 275578452,3582519876,10747559628,75232917396,75232917425,451397504550

%N a(0)=1 and for n>0: a(n) = if gcd(a(n-1),n)>1 then lcm(a(n-1),n) else a(n-1)+n.

%C As gcd(a(7-1),7) = gcd(42,7) = 7, a(7) = lcm(a(7-1),7) = a(6)*7/gcd(a(7-1),7) = 42*7/7 = 42 = a(6), are there more n such that a(n+1)=a(n)?

%H Robert Israel, <a href="/A076607/b076607.txt">Table of n, a(n) for n = 0..1145</a>

%p A[0]:= 1:

%p for n from 1 to 100 do

%p if igcd(A[n-1],n) > 1 then A[n]:= ilcm(A[n-1],n)

%p else A[n]:= A[n-1]+n

%p fi

%p od:

%p seq(A[i],i=0..100); # _Robert Israel_, Apr 18 2019

%K nonn

%O 0,2

%A _Reinhard Zumkeller_, Oct 21 2002

%E Corrected by _Robert Israel_, Apr 18 2019

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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)