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 21-23 of 23 results.

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

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
Previous Showing 21-23 of 23 results.