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.

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

A110270 a(n) = (n mod 2)*(n mod 3).

Original entry on oeis.org

0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 18 2005

Keywords

Comments

Period 6: repeat [0, 1, 0, 0, 0, 2]. - Joerg Arndt, Aug 17 2014
Least positive integer k such that n^k == 1 (mod 6), or 0 if GCD(n,6) > 1. - Bruno Berselli, Mar 22 2016

Crossrefs

Programs

  • Magma
    &cat [[0,1,0,0,0,2]^^20]; // Bruno Berselli, Mar 22 2016
    
  • Maple
    A110270:=n->(n mod 2)*(n mod 3): seq(A110270(n), n=0..100); # Wesley Ivan Hurt, Aug 16 2014
  • Mathematica
    Table[Mod[n,2]Mod[n,3],{n,0,110}] (* or *) PadRight[{},110,{0,1,0,0,0,2}] (* Harvey P. Dale, Oct 01 2013 *)
  • PARI
    a(n) = (n % 2) * (n % 3); \\ Michel Marcus, Aug 17 2014
    
  • PARI
    concat(0, Vec(x*(1+2*x^4)/((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)) + O(x^50))) \\ Colin Barker, Mar 22 2016

Formula

a(n) = A000035(n) * A010872(n).
a(n) = n mod (2 + n mod 2). - Wesley Ivan Hurt, Aug 16 2014
a(n) = a(n-6) for n>5. G.f.: x*(1+2*x^4) / ((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)). - Colin Barker, Mar 22 2016
a(n) = ( 6*sin(n*Pi/3) - sqrt(3) )*( sin(n*Pi/3) + sin(2*n*Pi/3) )/6. - Wesley Ivan Hurt, Jun 23 2016
Showing 1-2 of 2 results.