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.

A080374 a(n)=lcm of first n consecutive prime differences.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 24, 24, 24, 24, 24, 168, 168, 168, 168, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840
Offset: 1

Views

Author

Labos Elemer, Feb 27 2003

Keywords

Examples

			n=25: first 25 distinct differences are {1,2,4,6,8}, lcm=24=a(25)
From _Michael De Vlieger_, May 12 2017: (Start)
Record values of a(n) set at A080376(n):
    n  A080376(n)  a(A080376(n))
    1        2     1
    2        4     2
    3        9     4
    4       24     12
    5       30     24
    6       34     168
    7       99     840
    8      189     2520
    9      217     27720
   10      282     471240
   11      367     942480
   12      738     12252240
   13     3302     24504480
   14     3427     465585120
   15     3644     2327925600
   16     3793     72165693600
   17     4612     216497080800
   18     7970     6278415343200
   19     8688     144403552893600
   20    14357     288807105787200
   21    23283     12418705548849600
   22    34202     509166927502833600
   23    49414     18839176317604843200
   24    85633     131874234223233902400
   25    85787     6989334413831396827200
  ...
(End)
		

Crossrefs

Programs

  • Mathematica
    tb[x_] := Table[Prime[w+1]-Prime[w], {w, 1, x}] Table[Apply[LCM, tb[j]], {j, 1, 256}]
    (* Second program: *)
    FoldList[LCM @@ {#1, #2} &, Differences@ Array[Prime, 61]] (* Michael De Vlieger, May 12 2017 *)
  • PARI
    lista(nn) = {my(v = primes(nn)); my(vd = vector(nn-1, i, v[i+1] - v[i])); for (i=1, nn-1, print1(lcm(vector(i, k, vd[k])), ", "););} \\ Michel Marcus, May 13 2017