cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A135506 a(n) = x(n+1)/x(n) - 1 where x(1)=1 and x(k) = x(k-1) + lcm(x(k-1),k). Here x(n) = A135504(n).

Original entry on oeis.org

2, 1, 2, 5, 1, 7, 1, 1, 5, 11, 1, 13, 1, 5, 1, 17, 1, 19, 1, 1, 11, 23, 1, 5, 13, 1, 1, 29, 1, 31, 1, 11, 17, 1, 1, 37, 1, 13, 1, 41, 1, 43, 1, 1, 23, 47, 1, 1, 1, 17, 13, 53, 1, 1, 1, 1, 29, 59, 1, 61, 1, 1, 1, 13, 1, 67, 1, 23, 1, 71, 1, 73, 1, 1, 1, 1, 13, 79, 1, 1, 41, 83, 1, 1, 43, 29, 1, 89
Offset: 1

Views

Author

Benoit Cloitre, Feb 09 2008

Keywords

Comments

This sequence has properties related to primes. For instance: terms consist of 1's or primes only; if 3 never occurs, any prime p occurs finitely many times.
All prime numbers 'p' from the sequence A014963(n), which equals A003418(n+1)/A003418(n), are in a(n-1) = p. - Eric Desbiaux, Jan 11 2015
For any prime p > 3, a(p-1) = p. Also a(n) is not 3 for any n. All terms but a(1) and a(3) are odd, and probably all of them are not composite numbers; this is strongly related to a strong version of Linnik's Theorem (see Ruiz-Cabello link). - Serafín Ruiz-Cabello, Sep 30 2015
Per the prior comment, the distinct prime terms correspond to A045344. This is every prime except for 3. - Bill McEachen, Sep 12 2022

Crossrefs

Cf. A045344, A135504, A361460, A361461 (positions of 1's), A361462 [= a(n) mod 4], A361463, A361464, A361470.
Cf. also A106108.

Programs

  • Maple
    x[1]:= 1;
    for n from 2 to 101 do
      x[n]:= x[n-1] + ilcm(x[n-1],n);
      a[n-1]:= x[n]/x[n-1]-1;
    od:
    seq(a[n],n=1..100); # Robert Israel, Jan 11 2015
  • Mathematica
    a[n_] := x[n+1]/x[n] - 1; x[1] = 1; x[k_] := x[k] = x[k-1] + LCM[x[k-1], k]; Table[a[n], {n, 1, 88}] (* Jean-François Alcover, Jan 08 2013 *)
  • PARI
    x1=1;for(n=2,40,x2=x1+lcm(x1,n);t=x1;x1=x2;print1(x2/t-1,","))
    
  • Python
    from itertools import count, islice
    from math import lcm
    def A135506_gen(): # generator of terms
        x = 1
        for n in count(2):
            y = x+lcm(x,n)
            yield y//x-1
            x = y
    A135506_list = list(islice(A135506_gen(),20)) # Chai Wah Wu, Mar 13 2023

Formula

a(n) = A135504(n+1)/A135504(n) - 1.
a(n) = (n+1) / A361470(n). - Antti Karttunen, Mar 26 2023

Extensions

References to A135504 added by Antti Karttunen, Mar 07 2023

A135504 a(1)=1; for n>1, a(n) = a(n-1) + lcm(a(n-1),n).

Original entry on oeis.org

1, 3, 6, 18, 108, 216, 1728, 3456, 6912, 41472, 497664, 995328, 13934592, 27869184, 167215104, 334430208, 6019743744, 12039487488, 240789749760, 481579499520, 963158999040, 11557907988480, 277389791723520, 554779583447040
Offset: 1

Views

Author

Benoit Cloitre, Feb 09 2008, Feb 10 2008

Keywords

Comments

This sequence has properties related to primes. For instance: a(n+1)/a(n)-1 consists of 1's or primes only. Any prime p>=3 divides a(n) for the first time when n=p*w(p)-1 where w(p) is the least positive integer such that p*w(p)-1 is prime.
See A135506 for more comments and references.
Partial sums of A074179. - David Radcliffe, Jun 23 2025

Crossrefs

Programs

  • Haskell
    a135504 n = a135504_list !! (n-1)
    a135504_list = 1 : zipWith (+)
                       a135504_list (zipWith lcm a135504_list [2..])
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n-1] + LCM[a[n-1], n]; Table[a[n], {n, 1, 24}] (* Jean-François Alcover, Dec 16 2011 *)
    RecurrenceTable[{a[1]==1,a[n]==a[n-1]+LCM[a[n-1],n]},a,{n,30}] (* Harvey P. Dale, Mar 03 2013 *)
  • PARI
    x1=1;for(n=2,40,x2=x1+lcm(x1,n);t=x1;x1=x2;print1(x2,","))
    
  • Python
    from sympy import lcm
    l=[0, 1]
    for n in range(2, 101):
        x=l[n - 1]
        l.append(x + lcm(x, n))
    print(l) # Indranil Ghosh, Jun 27 2017
Showing 1-2 of 2 results.