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.

Previous Showing 11-20 of 28 results. Next

A109013 a(n) = gcd(n,10).

Original entry on oeis.org

10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A109004.

Programs

Formula

a(n) = 1 + [2|n] + 4*[5|n] + 4*[10|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-10).
Multiplicative with a(p^e, 10) = gcd(p^e, 10). - David W. Wilson, Jun 12 2005
G.f.: ( -10 - x - 2*x^2 - x^3 - 2*x^4 - 5*x^5 - 2*x^6 - x^7 - 2*x^8 - x^9 ) / ( (x-1)*(1+x)*(x^4 + x^3 + x^2 + x + 1)*(x^4 - x^3 + x^2 - x+1) ). - R. J. Mathar, Apr 04 2011
Dirichlet g.f.: zeta(s)*(1 + 1/2^s + 4/5^s + 4/10^s). - R. J. Mathar, Apr 04 2011
a(n) = ((n-1) mod 2 + 1)*(4*floor(((n-1) mod 5)/4) + 1). - Gary Detlefs, Dec 28 2011

A109010 a(n) = gcd(n,7).

Original entry on oeis.org

7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A109004.

Programs

Formula

a(n) = 1 + 6*[7|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-7).
Multiplicative with a(p^e, 7) = gcd(p^e, 7). - David W. Wilson, Jun 12 2005
From R. J. Mathar, Apr 04 2011: (Start)
Dirichlet g.f.: zeta(s)*(1 + 6/7^s).
G.f.: (-7 - x - x^2 - x^3 - x^4 - x^5 - x^6) / ((x-1)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)). (End)
a(n) = 6*floor(((n-1) mod 7)/6) + 1. - Gary Detlefs, Dec 28 2011

A109011 a(n) = gcd(n,8).

Original entry on oeis.org

8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = 1 + [2|n] + 2*[4|n] + 4*[8|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-8).
Multiplicative with a(p^e) = gcd(p^e, 8). - David W. Wilson, Jun 12 2005
G.f.: ( -8 - x - 2*x^2 - x^3 - 4*x^4 - x^5 - 2*x^6 - x^7 ) / ( (x-1)*(1+x)*(x^2+1)*(x^4+1) ). - R. J. Mathar, Apr 04 2011
Dirichlet g.f.: zeta(s)*(1 + 1/2^s + 2/4^s + 4/8^s). - R. J. Mathar, Apr 04 2011
a(n) = 2^(-(101*m^7 - 2464*m^6 + 23786*m^ 5 -115360*m^4 + 293909*m^3 - 371056*m^2 + 186204*m - 15120)/5040) where m = (n mod 8). - Luce ETIENNE, Nov 18 2018

A109014 a(n) = gcd(n,11).

Original entry on oeis.org

11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A109004.

Programs

  • Mathematica
    GCD[Range[0,100],11] (* Harvey P. Dale, May 14 2022 *)
  • Python
    from math import gcd
    def a(n): return gcd(n, 11)
    print([a(n) for n in range(99)]) # Michael S. Branicky, Nov 01 2021

Formula

a(n) = 1 + 10*[11|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-11).
Multiplicative with a(p^e, 11) = gcd(p^e, 11). - David W. Wilson, Jun 12 2005
Dirichlet g.f.: zeta(s)*(1+10/11^s). - R. J. Mathar, Apr 08 2011
a(n) = ((n-1) mod 2 + 1)*(10*floor(((n-1) mod 11)/10) + 1). - Gary Detlefs, Dec 28 2011

A109015 a(n) = gcd(n,12).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Periodic, with period = 12. - Harvey P. Dale, Dec 20 2018

Crossrefs

Cf. A109004.

Programs

  • Mathematica
    GCD[Range[0,100],12] (* or *) PadRight[{},120,{12,1,2,3,4,1,6,1,4,3,2,1}] (* Harvey P. Dale, Dec 20 2018 *)
  • Python
    from math import gcd
    def a(n): return gcd(n, 12)
    print([a(n) for n in range(99)]) # Michael S. Branicky, Dec 01 2021

Formula

a(n) = 1 + [2|n] + 2*[3|n] + 2*[4|n] + 2*[6|n] + 4*[12|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-12).
Multiplicative with a(p^e, 12) = gcd(p^e, 12). - David W. Wilson, Jun 12 2005
Dirichlet g.f.: zeta(s)*(1 + 1/2^s + 2/4^s)*(1 + 2/3^s). - R. J. Mathar, Apr 08 2011

A159335 Triangle read by rows: numerator of n/binomial(n,m).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Apr 10 2009

Keywords

Comments

This triangle first differs from A109004 (read as a triangle) at T(10, 4) and T(10,6).
T(n,m) is the smallest positive integer such that binomial(n,m)*T(n,m) is a multiple of n.

Examples

			Row 10 of Pascal's triangle is: 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1. {a(10,m)} of this sequence (A159335) is: 10, 1, 2, 1, 1, 5, 1, 1, 2, 1,10. Multiplying the corresponding integers, we get multiples of 10: 1*10=10,10*1=10, 45*2=90, 120*1=120, 210*1=210, 252*5=1260, 210*1=210, 120*1=120, 45*2=90, 10*1=10, 1*10=10.
		

Crossrefs

Cf. A165661 (denominators), A007318, A020475, A109004.

Programs

  • Magma
    /* As triangle */ [[n/GCD(n,Binomial(n, k)): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Jun 25 2018
  • Mathematica
    Table[n/GCD[n, Binomial[n, k]], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Jun 25 2018 *)
  • PARI
    for(n=0, 10, for(k=0,n, print1(n/gcd(n, binomial(n,k)), ", "))) \\ G. C. Greubel, Jun 25 2018
    

Formula

T(n,m) = n/gcd(n,binomial(n,m)).

Extensions

Extended by Ray Chandler, Jun 19 2009
Edited by Franklin T. Adams-Watters, Sep 24 2009

A165661 Triangle read by rows: denominator of n/binomial(n,m).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 5, 10, 5, 1, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 1, 7, 7, 35, 7, 7, 1, 1, 1, 1, 4, 28, 14, 14, 28, 4, 1, 1, 1, 1, 9, 12, 21, 126, 21, 12, 9, 1, 1, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 1, 11, 55, 165, 66, 77, 66, 165, 55, 11, 1, 1
Offset: 0

Views

Author

Keywords

Comments

First difference from A107711 is at T(10,4) = 21 instead of 42.

Crossrefs

Cf. A159335 (numerators), A107711, A007318, A109004.

Formula

T(n,m) = binomial(n,m)/gcd(n,binomial(n,m)).

A281726 Triangular array read by rows: T(n,k) is the number of elements in an n X k matrix that will be assigned the same value whether the integers from 1 to n*k are assigned to elements in row-major order or column-major order.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Jan 28 2017

Keywords

Comments

From Jon E. Schoenfield, Dec 10 2023: (Start)
T(n,k) is also the number of lattice points that lie on a line segment from (0,0) to (n-k,k-1). Thus, row n of the triangle lists, for each of the n 1st-quadrant lattice points P whose Manhattan distance from the origin is n-1, the number of lattice points on a line segment from the origin to P.
E.g., for n = 5, the 5 1st-quadrant lattice points whose Manhattan distance from the origin is 4 are (0,4), (1,3), (2,2), (3,1), and (4,0), and a line segment drawn from the origin to each of these points will intersect 5, 2, 3, 2, and 5 lattice points, respectively; { 5, 2, 3, 2, 5 } is row 5 of the triangle. (End)

Examples

			For n=3 and k=2, the matrix will be
  1 2  and  1 4
  3 4       2 5
  5 6       3 6
and there are 2 identical terms (1 and 6).
Triangle begins:
  1;
  2, 2;
  3, 2, 3;
  4, 2, 2, 4;
  5, 2, 3, 2, 5;
  6, 2, 2, 2, 2, 6;
  ...
		

Crossrefs

Main diagonal and column k=1 give A000027.

Programs

  • Maple
    T:= (n, k)-> add(add(`if`(j+k*(i-1)=i+n*(j-1), 1, 0), i=1..n), j=1..k):
    seq(seq(T(n,k), k=1..n), n=1..20);  # Alois P. Heinz, Jan 28 2017
  • Mathematica
    Array[1+GCD[#,Range[0,#]]&,20,0] (* Paolo Xausa, Dec 08 2023 *)
  • PARI
    a(n, k) = {ml = matrix(n, k, i, j, ((i-1)*k+j)); mc = matrix(n, k, i, j, ((j-1)*n+i)); sum(i=1, n, sum(j=1, k, ml[i,j] == mc[i,j]));}

Formula

T(n,k) = 1 + gcd(n-1, k-1). - Jon E. Schoenfield, Dec 08 2023

A140682 Triangle T(n,k) = gcd(n,k)-binomial(n,k), 0<=k<=n.

Original entry on oeis.org

-1, 0, 0, 1, -1, 1, 2, -2, -2, 2, 3, -3, -4, -3, 3, 4, -4, -9, -9, -4, 4, 5, -5, -13, -17, -13, -5, 5, 6, -6, -20, -34, -34, -20, -6, 6, 7, -7, -26, -55, -66, -55, -26, -7, 7, 8, -8, -35, -81, -125, -125, -81, -35, -8, 8, 9, -9, -43, -119, -208, -247, -208, -119, -43, -9, 9
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Jul 11 2008

Keywords

Comments

Row sums are -1, 0, 1, 0, -4, -18, -43, -108, -228, -482, -987...

Examples

			-1;
0, 0;
1, -1, 1;
2, -2, -2, 2;
3, -3, -4, -3, 3;
4, -4, -9, -9, -4, 4;
5, -5, -13, -17, -13, -5, 5;
6, -6, -20, -34, -34, -20, -6, 6;
7, -7, -26, -55, -66, -55, -26, -7, 7;
8, -8, -35, -81, -125, -125, -81, -35, -8, 8;
9, -9, -43, -119, -208, -247, -208, -119, -43, -9, 9;
		

Crossrefs

Cf. A109004.

Programs

  • Maple
    A140682 := proc(n,k)
        igcd(n,k)-binomial(n,k) ;
    end proc: # R. J. Mathar, Jan 17 2013
  • Mathematica
    Clear[p, x, n] p[x_, n_] = Sum[(GCD[n, i] - Binomial[n, i])*x^i, {i, 0, n}]; Table[ExpandAll[p[x, n]], {n, 1, 10}]; a = Table[CoefficientList[p[x, n], x], {n, 1, 10}]; Flatten[a]

Formula

T(n,k) = T(n,n-k).
T(n,k) = A109004(n,k)-A007318(n,k). - R. J. Mathar, Jan 17 2013

Extensions

New name, editing, and missing leading terms added. - R. J. Mathar, Jan 17 2013

A266685 T(n,k) is the number of loops appearing in pattern of circular arc connecting two vertices of regular polygons. (See Comments.)

Original entry on oeis.org

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

Views

Author

Kival Ngaokrajang, Jan 02 2016

Keywords

Comments

The patterns in A262343 and A264906 can be considered as case of skip 0 and 1 vertex of circle construction on regular polygons. k is the cyclic number of loops of the case skip n-vertices. See illustration for more details.
T(n,k) is conjectured to be even rows of A109004 (excluding the first column).

Examples

			Irregular triangle begins:
n\k   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
0     1  2
1     1  2  1  4
2     1  2  3  2  1  6
3     1  2  1  4  1  2  1  8
4     1  2  1  2  5  2  1  2  1 10
5     1  2  3  4  1  6  1  4  3  2  1 12
6     1  2  1  2  1  2  7  2  1  2  1  2  1 14
7     1  2  1  4  1  2  1  8  1  2  1  4  1  2  1 16
...
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[2 n + 3 + k, k + 1], {n, 0, 8}, {k, 0, 2 n + 1}] // Flatten (* Michael De Vlieger, Jan 03 2016 *)
  • PARI
    for (n=0, 20,for (k=0, 2*n+2, t=gcd(2*n+3+k, k+1); print1(t, ", ")))

Formula

T(n,k) = gcd(2*n+3+k, k+1), n >= 0, k = 0..2*n+1.
Previous Showing 11-20 of 28 results. Next