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

A236857 Each n occurs the least common multiple (LCM) of {1, 2, ..., n} (= A003418(n)) times.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6
Offset: 0

Views

Author

Antti Karttunen, Feb 27 2014

Keywords

Comments

Least k such that A236856(k) >= n.
Zero occurs once at a(0), because A003418(0)=1 by definition.
Useful when computing irregular tables like A238280, as a(n) gives the row index of the n-th term in such sequences. Note that as A238280 begins with row 1, it starts referring to this sequence only from a(1)=1 onward.

Examples

			Can be viewed as an irregular table, where each row n (starting from row zero) contains A003418(n) copies of n:
0;
1;
2, 2;
3, 3, 3, 3, 3, 3;
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4;
...
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Flatten[Table[PadRight[{},LCM@@Range[n],{n}],{n,6}]]] (* Harvey P. Dale, Jul 29 2021 *)

A236858 Irregular table where row n contains numbers from 1 to the least common multiple (LCM) of {1, 2, ..., n}. Row 0 is given as a(0)=1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60
Offset: 0

Views

Author

Antti Karttunen, Feb 27 2014

Keywords

Comments

Numbers 1..A003418(n) followed by numbers 1..A003418(n+1), etc., where A003418(n) gives the least common multiple (LCM) of {1, 2, ..., n} for n >= 1 and A003418(0)=1.
Useful when computing irregular tables like A238280. Note that as A238280 begins with row 1, it starts referring to this sequence only from a(1) onward.

Examples

			The sequence can be viewed also as an irregular table that starts as:
0 | 1;
1 | 1;
2 | 1, 2;
3 | 1, 2, 3, 4, 5, 6;
4 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
...
		

Crossrefs

A003418(n) gives the last term of each row n.

Programs

Formula

a(n) = n - A236856(A236857(n)- 1).

A238280 Irregular triangle read by rows, T(n,k) = Sum_{i = 1..n} k mod i, k = 1..m where m = lcm(1..n).

Original entry on oeis.org

0, 1, 0, 2, 2, 1, 1, 3, 0, 3, 4, 4, 1, 4, 2, 5, 2, 2, 3, 6, 0, 4, 6, 7, 5, 4, 3, 7, 5, 6, 3, 7, 2, 6, 8, 4, 2, 6, 5, 9, 2, 3, 5, 9, 4, 3, 5, 6, 4, 8, 2, 6, 4, 5, 7, 6, 1, 5, 7, 8, 1, 5, 4, 8, 6, 2, 4, 8, 3, 7, 4, 5, 3, 7, 6, 5, 3, 4, 6, 10, 0, 5, 8, 10, 9, 9, 3, 8, 7, 9, 7, 12, 2, 7, 10, 7, 6, 11, 5, 10, 4, 6, 9, 14, 4, 4, 7, 9, 8, 13, 2, 7, 6, 8, 11
Offset: 1

Views

Author

Kival Ngaokrajang, Feb 22 2014

Keywords

Comments

Row n contains A003418(n) terms.
The penultimate term (the one before zero) of row n = A000217(n-1).

Examples

			Row n of this irregular triangle is obtained by taking the first A003418(n) = lcm(1..n) terms (up to and including the first zero) of the following array (which starts at row n=1 and column k=1 and is periodic in each row):
  0; 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  1  0; 1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0
  2  2  1  1  3  0; 2  2  1  1  3  0  2  2  1  1  3  0  2  2 # A110269
  3  4  4  1  4  2  5  2  2  3  6  0; 3  4  4  1  4  2  5  2
  4  6  7  5  4  3  7  5  6  3  7  2  6  8  4  2  6  5  9  2
  5  8 10  9  9  3  8  7  9  7 12  2  7 10  7  6 11  5 10  4
  6 10 13 13 14  9  8  8 11 10 16  7 13 10  8  8 14  9 15 10
  7 12 16 17 19 15 15  8 12 12 19 11 18 16 15  8 15 11 18 14
  8 14 19 21 24 21 22 16 12 13 21 14 22 21 21 15 23 11 19 16
  9 16 22 25 29 27 29 24 21 13 22 16 25 25 26 21 30 19 28 16
		

Crossrefs

Programs

  • Scheme
    (define (A238280 n) (A238280tabf (A236857 n) (A236858 n)))
    (define (A238280tabf n k) (add (lambda (i) (modulo k i)) 1 n))
    ;; Implements sum_{i=lowlim..uplim} intfun(i):
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
    ;; Antti Karttunen, Feb 27 2014

A173185 Partial sums of A003418.

Original entry on oeis.org

1, 2, 4, 10, 22, 82, 142, 562, 1402, 3922, 6442, 34162, 61882, 422242, 782602, 1142962, 1863682, 14115922, 26368162, 259160722, 491953282, 724745842, 957538402, 6311767282, 11665996162, 38437140562, 65208284962, 145521718162, 225835151362, 2554924714162
Offset: 0

Views

Author

Jonathan Vos Post, Feb 12 2010

Keywords

Comments

From Antti Karttunen, Feb 27 2014: (Start)
For all n >= 4, a(n) mod 10 = 2 (as A003418(5) = 60, the first multiple of ten in that sequence).
For all n >= 24, a(n) mod 100 = 62 (as A003418(25) = 26771144400, the first multiple of one hundred in that sequence).
Cf. also A236856.
a(n-1) gives the position of the first element of row n in irregular tables like A238280.
(End)

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, ilcm(n, b(n-1))) end:
    a:= proc(n) a(n):= `if`(n<0, 0, a(n-1) +b(n)) end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Mar 31 2018
  • Mathematica
    Table[If[n == 0, 1, LCM @@ Range[n]], {n, 0, 50}] // Accumulate (* Jean-François Alcover, Jan 03 2022 *)
  • PARI
    a(n) = sum(k=0, n, lcm(vector(k, i, i))); \\ Michel Marcus, Mar 13 2018
  • Scheme
    (define (A173185 n) (if (< n 1) 1 (+ (A173185 (- n 1)) (A003418 n))))
    

Formula

a(n) = Sum_{i=0..n} A003418(i).

Extensions

Missing term a(9)=3922 inserted by Antti Karttunen, Feb 27 2014
Showing 1-4 of 4 results.