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.

A239611 a(n) = Sum_{0 < x,y <= n and gcd(x^2 + y^2, n)=1} gcd(x^2 + y^2 - 1, n).

Original entry on oeis.org

1, 4, 16, 32, 32, 64, 96, 192, 216, 128, 240, 512, 288, 384, 512, 1024, 512, 864, 720, 1024, 1536, 960, 1056, 3072, 1200, 1152, 2592, 3072, 1568, 2048, 1920, 5120, 3840, 2048, 3072, 6912, 2592, 2880, 4608, 6144, 3200, 6144, 3696, 7680, 6912, 4224, 4416
Offset: 1

Views

Author

Keywords

Comments

Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.
Multiplicative by the Chinese remainder theorem since gcd(x, m*n) = gcd(x, m)*gcd(x, n) for gcd(m, n) = 1. - Andrew Howroyd, Aug 07 2018

Crossrefs

Programs

  • Mathematica
    g2[n_] := Sum[If[GCD[x^2 + y^2, n] == 1, GCD[x^2 + y^2 - 1, n], 0], {x, 1, n}, {y, 1, n}]; Array[g2,100]
  • PARI
    a(n) = {s = 0; for (x=1, n, for (y=1, n, if (gcd(x^2+y^2,n) == 1, s += gcd(x^2+y^2-1,n)););); s;} \\ Michel Marcus, Jun 29 2014

A239612 a(n) = Sum_{0 < x,y,z <= n and gcd(x^2 + y^2 + z^2, n)=1} gcd(x^2 + y^2 + z^2 - 1, n).

Original entry on oeis.org

1, 8, 30, 112, 220, 240, 546, 1280, 1134, 1760, 2310, 3360, 4212, 4368, 6600, 13312, 9520, 9072, 12654, 24640, 16380, 18480, 22770, 38400, 42500, 33696, 39366, 61152, 47908, 52800, 56730, 131072, 69300, 76160, 120120, 127008, 99900, 101232, 126360, 281600
Offset: 1

Views

Author

Keywords

Comments

Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.

Crossrefs

Programs

  • Mathematica
    g3[n_] := Sum[If[GCD[x^2 + y^2 + z^2, n] == 1, GCD[x^2 + y^2 + z^2 - 1, n], 0],{x, 1, n},{y, 1, n},{z,1,n}]; Array[g3,100]
  • PARI
    a(n) = {s = 0; for (x=1, n, for (y=1, n, for (z=1, n, if (gcd(x^2+y^2+z^2,n) == 1, s += gcd(x^2+y^2+z^2-1,n));););); s;} \\ Michel Marcus, Jun 29 2014
    
  • PARI
    a(n)={my(p=lift(Mod(sum(i=0, n-1, x^(i^2%n)), x^n-1)^3)); sum(i=0, n-1, if(gcd(i,n)==1, polcoeff(p,i)*gcd((i-1)%n,n)))} \\ Andrew Howroyd, Aug 07 2018

Extensions

Keyword:mult added by Andrew Howroyd, Aug 07 2018

A239613 a(n) = Sum_{0 < x,y,z,t <= n and gcd(x^2 + y^2 + z^2 + t^2, n)=1} gcd(x^2 + y^2 + z^2 + t^2 - 1, n).

Original entry on oeis.org

1, 16, 96, 384, 960, 1536, 4032, 8192, 11664, 15360, 26400, 36864, 52416, 64512, 92160, 163840, 156672, 186624, 246240, 368640, 387072, 422400, 534336, 786432, 900000, 838656, 1259712, 1548288, 1364160, 1474560, 1785600, 3145728
Offset: 1

Views

Author

Keywords

Comments

Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.

Crossrefs

Programs

  • Mathematica
    g4[n_] := Sum[If[GCD[x^2 + y^2+ z^2+ t^2, n] == 1, GCD[x^2 + y^2+ z^2+ t^2 - 1, n], 0], {x, 1, n}, {y, 1, n},{z,1,n},{t,1,n}]; Array[g4,100]
  • PARI
    a(n) = {s = 0; for (x=1, n, for (y=1, n, for (z=1, n, for (t=1, n, if (gcd(x^2+y^2+z^2+t^2,n) == 1, s += gcd(x^2+y^2+z^2+t^2-1,n)););););); s;} \\ Michel Marcus, Jun 29 2014
    
  • PARI
    a(n)={my(p=lift(Mod(sum(i=0, n-1, x^(i^2%n)), x^n-1)^4)); sum(i=0, n-1, if(gcd(i,n)==1, polcoeff(p,i)*gcd((i-1)%n,n)))} \\ Andrew Howroyd, Aug 07 2018

Extensions

Keyword:mult added by Andrew Howroyd, Aug 07 2018

A239614 a(n) = A239611(n) / A079458(n).

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 3, 4, 2, 8, 2, 4, 4, 8, 2, 6, 2, 8, 4, 4, 2, 12, 3, 4, 4, 8, 2, 8, 2, 10, 4, 4, 4, 12, 2, 4, 4, 12, 2, 8, 2, 8, 6, 4, 2, 16, 3, 6, 4, 8, 2, 8, 4, 12, 4, 4, 2, 16, 2, 4, 6, 12, 4, 8, 2, 8, 4, 8, 2, 18, 2, 4, 6, 8, 4, 8, 2, 16, 5, 4, 2, 16, 4, 4, 4, 12, 2, 12, 4, 8, 4, 4, 4, 20, 2, 6, 6, 12, 2, 8, 2, 12, 8
Offset: 1

Views

Author

Keywords

Comments

Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.
Multiplicative because both A239611 and A079458 are. - Andrew Howroyd, Aug 07 2018

Crossrefs

Programs

  • Mathematica
    a239611[n_] := Sum[If[GCD[x^2 + y^2, n] == 1, GCD[x^2 + y^2 - 1, n], 0], {x, 1, n}, {y, 1, n}];
    a079458[n_] := Product[{p, e} = pe; Which[p==2, 2^(2e-1), Mod[p, 4]==3, (p^2-1)p^(2e-2), Mod[p, 4]==1, (p-1)^2 p^(2e-2)], {pe, FactorInteger[n]}];
    a[1] = 1; a[n_] := a239611[n]/a079458[n];
    Array[a, 105] (* Jean-François Alcover, Dec 04 2018 *)

Formula

Conjectures from Ridouane Oudra, Jul 22 2024: (Start)
a(n) = A010710(n)*tau(n) - 2*tau(2n) ;
a(2*n) = 2*tau(n) ;
a(2*n+1) = tau(2*n+1). (End)

Extensions

More terms from Antti Karttunen, Sep 23 2017
Showing 1-4 of 4 results.