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.

A275120 List the least common multiples of {1, 2, ..., k} for k = 0, 1, ...; this sequence gives the length of the n-th block of consecutive equal numbers.

Original entry on oeis.org

2, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, 3, 4, 2, 6, 2, 2, 6, 8, 4, 2, 4, 2, 4, 8, 4, 2, 1, 3, 6, 2, 10, 2, 6, 6, 4, 2, 4, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 2, 8, 5, 1, 6, 6, 2, 6, 4, 2, 6, 4, 14, 4, 2, 4, 14, 6, 6, 4, 2, 4, 6, 2, 6, 6, 6, 4, 6
Offset: 1

Views

Author

Tyler Skywalker, Jul 18 2016

Keywords

Comments

a(n) is the count of how many consecutive terms in A003418 are equal.

Examples

			lcm({}) = lcm({1}) = 1, so a(1) = 2.
lcm({1, 2}) = 2, so a(2) = 1.
lcm({1, 2, 3}) = 6, so a(3) = 1.
lcm({1, 2, 3, 4}) = 12, so a(4) = 1.
lcm({1, ..., 5}) = lcm({1, ..., 6}) = 60, so a(5) = 2.
lcm({1, ..., 7}) = 420, so a(6) = 1.
lcm({1, ..., 8}) = 840, so a(7) = 1.
lcm({1, ..., 9}) = lcm({1, ..., 10}) = 2520, so a(8) = 2.
lcm({1, ..., 11}) = lcm({1, ..., 12}) = 27720, so a(9) = 2.
		

Crossrefs

Frequency of given numbers using A003418.
Apart from the first term, same as A057820.

Programs

  • Mathematica
    {2}~Join~Rest@ Most@ Map[Length, Split@ Table[LCM @@ Range@ n, {n, 396}]] (* Michael De Vlieger, Jul 18 2016 *)
  • PARI
    do(lim)=my(v=List()); for(e=2,logint(lim\=1,2), forprime(p=2,sqrtnint(lim,e), listput(v,p^e))); v=Set(concat(Vec(v), primes([2,lim]))); concat(2, vector(#v-1,i,v[i+1]-v[i])) \\ Charles R Greathouse IV, Jul 18 2016

Formula

a(n) = A057820(n), n>1.