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-3 of 3 results.

A217663 a(n) = A217662(n+2)/A217662(n) - 1, n > 0.

Original entry on oeis.org

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

Views

Author

Pedja Terzic, Oct 10 2012

Keywords

Comments

a(prime(n)-1) = prime(n) for n>1, so this sequence includes all odd primes. - Jon Perry, Oct 10 2012, edited & corrected by M. F. Hasler, Oct 11 2012

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n]==a[n-2]+LCM[n-1,a[n-2]],a[1]==2,a[2]==2},a{n,3,51}] /RecurrenceTable[{a[n]==a[n-2]+LCM[n-1,a[n-2]],a[1]==2,a[2]==2},a,{n,1,49}]-1
    t = {2, 2}; Do[AppendTo[t, t[[-2]] + LCM[n - 1, t[[-2]]]], {n, 3, 100}]; Drop[t, 2]/Drop[t, -2] - 1 (* T. D. Noe, Oct 10 2012 *)

A304821 For n > 3, a(n) = a(n-3) + lcm(a(n-3), n-2) with a(1)=6, a(2)=6, a(3)=6.

Original entry on oeis.org

6, 6, 6, 12, 12, 18, 72, 24, 144, 144, 96, 864, 1728, 192, 12096, 13824, 1152, 24192, 248832, 2304, 483840, 1492992, 18432, 5806080, 35831808, 36864, 34836480, 501645312, 147456, 69672960, 15049359360, 884736
Offset: 1

Views

Author

Pedja Terzic, May 19 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Fold[Append[#1, #1[[-3]] + LCM[#1[[-3]], #2 + 1]] &, {6, 6, 6}, Range@ 29] (* Michael De Vlieger, May 20 2018 *)
  • PARI
    Recurrence(n)={b1=6;b2=6;b3=6;list=[6,6,6];for(k=4,n,b4=b1+lcm(k-2,b1);list=concat(list,b4);b1=b2;b2=b3;b3=b4);print(list)}

A304822 a(n) = A304821(n+3)/A304821(n) - 1.

Original entry on oeis.org

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

Views

Author

Pedja Terzic, May 19 2018

Keywords

Comments

Conjecture: This sequence consists of 1's and primes only.
a(n) divides n+1. - A.H.M. Smeets, Jul 02 2018

Crossrefs

Programs

  • Mathematica
    Drop[#, 3] &@ Fold[Append[#1, {#2, #2/#1 - 1} & @@ {#1[[-3, 1]], #1[[-3, 1]] + LCM[#1[[-3, 1]], #2 + 1]}] &, {{6, 0}, {6, 0}, {6, 0}}, Range@ 72] [[All, -1]] (* Michael De Vlieger, May 20 2018 *)
  • PARI
    Generator(n)={b1=6;b2=6;b3=6;list=[];for(k=4,n,b4=b1+lcm(k-2,b1);a=b4/b1-1;list=concat(list,a);b1=b2;b2=b3;b3=b4);print(list)}
    
  • Python
    from math import gcd
    n,an0,an1,an2 = 3,6,6,6
    while n-3 < 200:
        n += 1
        an0,an1,an2,an3 = an2+an2*(n-2)//gcd(an2,n-2),an0,an1,an2
        # an0 = A304821(n), an3 = A304821(n-3)
        print(n-3,an0//an3-1)
    # A.H.M. Smeets, Jul 02 2018
Showing 1-3 of 3 results.