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

A177121 Square array T(n,k) read by antidiagonals up: T(n,k) = 1 if n=1; otherwise if n divides k then T(n,k) = -n+1; otherwise T(n,k) = 1.

Original entry on oeis.org

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

Views

Author

Mats Granvik and Gary W. Adamson, May 03 2010

Keywords

Comments

Replace the first column in A077049 with any k-th column in A177121 (this array) to get a new array. Then the matrix inverse of the new array will have the k-th column of A054535 (Ramanujan sum) as its first column.
Obtained from A176079 by transposing, flipping signs, and adding a lower triangle of all -1's. - R. J. Mathar, Jul 08 2011

Examples

			Table begins:
  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
  1, -1,  1, -1,  1, -1,  1, -1,  1, -1, ...
  1,  1, -2,  1,  1, -2,  1,  1, -2,  1, ...
  1,  1,  1, -3,  1,  1,  1, -3,  1,  1, ...
  1,  1,  1,  1, -4,  1,  1,  1,  1, -4, ...
  1,  1,  1,  1,  1, -5,  1,  1,  1,  1, ...
  1,  1,  1,  1,  1,  1, -6,  1,  1,  1, ...
  1,  1,  1,  1,  1,  1,  1, -7,  1,  1, ...
  1,  1,  1,  1,  1,  1,  1,  1, -8,  1, ...
  1,  1,  1,  1,  1,  1,  1,  1,  1, -9, ...
  ...
		

Crossrefs

Programs

  • Excel
    =if(row()=1;1;if(mod(column();row())=0;-row()+1;1))
    
  • PARI
    up_to = 65703; \\ = binomial(362+1,2)
    A177121sq(row,col) = if(1==row,1,if(!(col%row),(1-row),1));
    A177121list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, if(i++ > up_to, return(v)); v[i] = A177121sq((a-(col-1)),col))); (v); };
    v177121 = A177121list(up_to);
    A177121(n) = v177121[n]; \\ Antti Karttunen, Sep 25 2018

Formula

T(n,k) = 1 if n=1; otherwise, if n divides k then T(n,k) = -n+1; otherwise T(n,k) = 1.

A127332 A126988 * A002321.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 5, 4, 4, 5, 9, 1, 10, 8, 3, 7, 15, 3, 16, 2, 6, 17, 21, -6, 13, 19, 11, 8, 27, -5, 27, 10, 13, 28, 10, -10, 35, 31, 17, -6, 40, -3, 40, 20, -4, 40, 44, -18, 32, 18, 26, 23, 50, 4, 21, 0, 28, 54, 58, -45, 59, 53, 3, 19, 24, 11, 65, 37, 39, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 10 2007

Keywords

Examples

			a(6) = 3 = 6*1 + 3*0 + 2*(-1) + 0*(-1) + 0*(-2) + 1*(-1), where (6, 3, 2, 0, 0, 1) = row 6 of A126988.
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 70, m}, m = Table[Sum[MoebiusMu@k, {k, n}], {n, nn}]; Table[Total@ Array[m[[#]] If[Mod[n, #] == 0, n/#, 0] &, n], {n, nn}]] (* Michael De Vlieger, Jun 14 2018 *)
  • PARI
    lista(nn) = {mat = matrix(nn, nn, n, k, if (n % k, 0, n/k)); vec = matrix(nn, 1, n, k, if (k==1, mertens(n), 0)); res = (mat*vec); for (n = 1, nn, print1(res[n, 1], ", "););} \\ Michel Marcus, Sep 25 2013
    
  • PARI
    a(n) = sum(k=1, n, moebius(k / gcd(n, k)) * eulerphi(k) / eulerphi(k / gcd(n, k))); \\ Daniel Suteu, Jun 23 2018

Formula

M * V where M = A126988 as an infinite lower triangular matrix and V = the Mertens sequence, A002321 as a vector: [1, 0, -1, -1, -2, -1, ...].
a(n) = Sum_{q=1..n} c_q(n), where c_q(n) is the Ramanujan's sum function given in A054533. - Daniel Suteu, Jun 14 2018

Extensions

Corrected and extended by Michel Marcus, Sep 25 2013

A159936 Triangle read by rows, A051731 * A054533 * transpose(A101688), provided A101688 is read as a square array.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Apr 26 2009

Keywords

Comments

Row sums = A057661: (1, 2, 4, 6, 11, 11, 22,...). Right border = A000010, phi(n).

Examples

			First few rows of the triangle are as follows:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 2, 2;
  1, 1, 2, 3, 4;
  1, 1, 2, 2, 3, 2;
  1, 1, 2, 3, 4, 5, 6;
  1, 1, 2, 2, 4, 4, 4, 4;
  1, 1, 2, 3, 3, 3, 6, 6, 6;
  1, 1, 2, 2, 4, 4, 5, 4, 5, 4;
  1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
  1, 1, 2, 2, 3, 2, 4, 4, 6, 6,  4,  4;
  1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
  1, 1, 2, 2, 4, 4, 6, 6, 7, 6,  7,  6,  7, 6;
  1, 1, 2, 3, 3, 3, 5, 4, 3, 5,  9,  8, 10, 9, 8;
  1, 1, 2, 2, 4, 4, 4, 4, 8, 8,  8,  8,  8, 8, 8, 8;
  ...
		

Crossrefs

Formula

Triangle read by rows, A051731 * A054533 * A000012. A051731 = the inverse Mobius transform. A054533 = the lower left half of the Ramanujan sum table. The operation (* transpose(A101688)) takes partial sums of (A051731 * A054533) starting from the right. [Edited by Petros Hadjicostas, Jul 30 2019]

Extensions

Name edited by Petros Hadjicostas, Jul 30 2019

A227507 Table of p(a,n) read by antidiagonals, where p(a,n) = Sum_{k=1..n} gcd(k,n) exp(2 Pi i k a / n) is the Fourier transform of the greatest common divisor.

Original entry on oeis.org

1, 3, 1, 5, 1, 1, 8, 2, 3, 1, 9, 2, 2, 1, 1, 15, 4, 4, 5, 3, 1, 13, 2, 4, 2, 2, 1, 1, 20, 6, 6, 4, 8, 2, 3, 1, 21, 4, 6, 5, 4, 2, 5, 1, 1, 27, 6, 8, 6, 6, 9, 4, 2, 3, 1, 21, 4, 6, 4, 6, 2, 4, 2, 2, 1, 1, 40, 10, 12, 12, 12, 6, 15, 4, 8, 5, 3, 1, 25, 4, 10, 4, 6, 4, 6, 2, 4, 2, 2, 1, 1, 39, 12, 8, 10, 12, 6
Offset: 1

Views

Author

Peter H van der Kamp, Jul 13 2013

Keywords

Comments

p(a,n) gives the number of pairs (i,j) of congruence classes modulo n, such that i*j = a mod n.
p(a,n) is a multiplicative function of n.

Examples

			1, 3, 5, 8, 9, 15, 13, 20, 21, 27
1, 1, 2, 2, 4, 2, 6, 4, 6, 4
1, 3, 2, 4, 4, 6, 6, 8, 6, 12
1, 1, 5, 2, 4, 5, 6, 4, 12, 4
1, 3, 2, 8, 4, 6, 6, 12, 6, 12
1, 1, 2, 2, 9, 2, 6, 4, 6, 9
The array G_d(n) of Abel et al. (with A018804 on the diagonal) starts as follows:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ,...
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,...
2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2,...
2, 4, 2, 8, 2, 4, 2, 8, 2, 4, 2, 8, 2, 4, 2, 8, 2, 4, 2, 8,...
4, 4, 4, 4, 9, 4, 4, 4, 4, 9, 4, 4, 4, 4, 9, 4, 4, 4, 4, 9,...
2, 6, 5, 6, 2,15, 2, 6, 5, 6, 2,15, 2, 6, 5, 6, 2,15, 2, 6,...
6, 6, 6, 6, 6, 6,13, 6, 6, 6, 6, 6, 6,13, 6, 6, 6, 6, 6, 6,...
4, 8, 4,12, 4, 8, 4,20, 4, 8, 4,12, 4, 8, 4,20, 4, 8, 4,12,..
6, 6,12, 6, 6,12, 6, 6,21, 6, 6,12, 6, 6,12, 6, 6,21, 6, 6,...
4,12, 4,12, 9,12, 4,12, 4,27, 4,12, 4,12, 9,12, 4,12, 4,27,...
10,10,10,10,10,10,10,10,10,10,21,10,10,10,10,10,10,10,10,10,...
4, 8,10,16, 4,20, 4,16,10, 8, 4,40, 4, 8,10,16, 4,20, 4,16,...
12,12,12,12,12,12,12,12,12,12,12,12,25,12,12,12,12,12,12,12,...
... - _R. J. Mathar_, Jan 21 2018
		

Crossrefs

Programs

  • Maple
    p:=(a,n)->add(d*phi(n/d),d in divisors(gcd(a,n))):
    seq(seq(p(a,n-a),a=0..n-1),n=1..10);

Formula

The function can be written as a generalized Ramanujan sum: p(a,n) = Sum_{d|gcd(a,n)} d phi(n/d), where phi(n) denotes the totient function.
The rows of its table are equal to two of the diagonals: p(a,n) = p(n-a,n) = p(n+a,n).
p(0,n) = A018804(n), p(1,n) = A000010(n).
f(n) = Sum_{k=1..n} p(r,k)/k = Sum_{k=1..n} c_k(r)/k * floor(n/k), where c_k(r) denotes Ramanujan's sum (A054533(r)).

A086811 Average (scaled by a certain explicit factor) over all integers k of a_k(n), the n-th coefficient of the k-th cyclotomic polynomial.

Original entry on oeis.org

0, 3, 6, 16, 45, 126, 224, 1344, 684, 1116, 4752, 23760, 56784, 286944, 164664, 281472, 2449224, 7371648, 27086400, 160392960, 49635936, 68277888, 1049956992, 6077306880, 1252224000, 3240801792, 2083408128, 4066530048, 35225729280, 142745587200, 717382656000, 6279166033920, 2442775449600, 2080906813440, 2251759104000
Offset: 1

Views

Author

Pieter Moree (moree(AT)mpim-bonn.mpg.de), Aug 05 2003

Keywords

Comments

When n is odd the n-th term is an integer. If n is even then twice the n-th term is an integer. Conjecturally (Y. Gallot) the n-th term is always an integer. For n <= 128 this has been verified numerically by Yves Gallot. It is also an unproved conjecture due to H. Möller (1970) that no term of this sequence is negative.

Crossrefs

Programs

  • Maple
    with(numtheory):for k from 1 to 50 do; v := 1: w := 1:j := 1:z := 1:while ithprime(j)<=k do; v := v*ithprime(j); w := w*(1+1/ithprime(j)); z := z*(ithprime(j)+1); j := j+1; end do: v := v*k:z := z*k:q := ithprime(j):te := 0:for i from 1 to nops(divisors(v)) do; d := divisors(v)[i]; kl(x) := 1; for j from 1 to k do; if modp(d,j)=0 then kl(x) := taylor(kl(x)*(1-x^j)^mobius(d/j),x,k+1); end if; end do: te := te+coeff(kl(x),x,k)/d; kl(x) := 1; for j from 1 to k do; if modp(q*d,j)=0 then kl(x) := taylor(kl(x)*(1-x^j)^mobius(q*d/j),x,k+1); end if; end do: te := te+coeff(kl(x),x,k)/d; end do: zr := te/(2*w):print(k,zr*z):end do:

Formula

Let M_k = k * Product_{prime p<=k} p. Let q be any prime > k. Then the k-th term (for k >= 2) is M_k * Sum_{d|M_k} ( a_d(k) + a_{d*q}(k) )/(2*d). The average of the k-th coefficient of the n-th cyclotomic polynomial is given by the k-th coefficient of this sequence divided by Zeta(2) * k * Product_{p<=k} (p+1). (Zeta(2) = Pi^2/6.) [See Section 8.3 in Moree and Hommerson (2003).]

Extensions

More terms from Petros Hadjicostas, Aug 01 2019 using the author's Maple program

A144733 Triangle read by rows, 2*A054533 - A054521.

Original entry on oeis.org

1, -3, 2, -3, -3, 4, -1, -4, -1, 4, -3, -3, -3, -3, 8, 1, -2, -4, -2, 1, 4, -3, -3, -3, -3, -3, -3, 12, -1, 0, -1, -8, -1, 0, -1, 8, -1, -1, -6, -1, -1, -6, -1, -1, 12, 1, -2, 1, -2, -8, -2, 1, -2, 1, 8, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, 20
Offset: 1

Views

Author

Gary W. Adamson, Sep 20 2008

Keywords

Comments

Right border = A140434: (1, 2, 4, 4, 8, 4, 12,...).
Left border = A133695: (1, -3, -3, -1, -3, 1, -3, -1,...)
Row sums = A000010, with negative signs after the first 1: (1, -1, -2, -2, -4, -2, -6,...).

Examples

			First few rows of the triangle =
   1;
  -3,  2;
  -3, -3,  4;
  -1, -4, -1,  4;
  -3, -3, -3, -3,  8;
   1, -2, -4, -2,  1,  4;
  -3, -3, -3, -3, -3, -3, 12;
  -1,  0, -1, -8  -1,  0, -1,  8;
  -1, -1, -6, -1, -1, -6, -1, -1, 12;
   1, -2,  1, -2, -8, -2,  1, -2,  1,  8;
  -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, 20;
   ...
		

Crossrefs

Formula

Triangle read by rows, 2*A054533 - A054521; as infinite lower triangular matrices.
T(n,k) = -I(gcd(n,k) = 1) + 2 * Sum_{d|gcd(n,k)} d * mu(n/d) for n >= 1 and 1 <= k <= n, where I(condition) = 1 if the condition holds, and 0 otherwise. - Petros Hadjicostas, Jul 29 2019
Previous Showing 11-16 of 16 results.