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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309705 a(n) = lcm(a(n-1), n) - gcd(a(n-1), n) where a(1) = 1. 1
1, 1, 2, 2, 9, 15, 104, 96, 285, 565, 6214, 37282, 484665, 6785309, 101779634, 814237070, 13842030189, 83052181131, 1577991441488, 7889957207436, 55229700452049, 1215053409945077, 27946228428736770, 111784913714947074, 2794622842873676849, 72660193914715598073 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

The sequence seems to grow between exponentially and factorially but that's just a suspicion.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..500

FORMULA

a(n) = lcm(a(n-1), n) - gcd(a(n-1), n) for n > 1.

EXAMPLE

For n = 5, since a(4) = 2, a(5) = lcm(5,2) - gcd(5,2) = 10 - 1 = 9.

MAPLE

a:= proc(n) option remember; `if`(n=1, 1,

      ilcm(a(n-1), n)-igcd(a(n-1), n))

    end:

seq(a(n), n=1..29);  # Alois P. Heinz, Sep 17 2019

MATHEMATICA

a[1] = 1; a[n_] := a[n] = LCM[a[n - 1], n] - GCD[a[n - 1], n]; Array[a, 26] (* Amiram Eldar, Sep 17 2019 *)

nxt[{n_, a_}]:={n+1, LCM[a, n+1]-GCD[a, n+1]}; NestList[nxt, {1, 1}, 30][[All, 2]] (* Harvey P. Dale, Apr 05 2020 *)

PROG

(Python)

def lcmMinusGcd(n):

    retlist = [1]

    for i in range(1, n):

        g = gcd(retlist[i-1], i+1)

        retlist.append( floor(retlist[i-1]*(i+1) / g) - g)

    return ', '.join(map(str, retlist))

(PARI) seq(n)={my(v=vector(n)); v[1]=1; for(n=2, #v, v[n] = lcm(v[n-1], n) - gcd(v[n-1], n)); v} \\ Andrew Howroyd, Aug 28 2019

CROSSREFS

Cf. A008339, A077139, A129090.

Sequence in context: A325936 A185755 A278458 * A290604 A039796 A224244

Adjacent sequences:  A309702 A309703 A309704 * A309706 A309707 A309708

KEYWORD

nonn

AUTHOR

Atticus Cull, Aug 13 2019

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 November 29 07:48 EST 2021. Contains 349416 sequences. (Running on oeis4.)