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-10 of 15 results. Next

A063454 Number of solutions to x^3 + y^3 = z^3 mod n.

Original entry on oeis.org

1, 4, 9, 20, 25, 36, 55, 112, 189, 100, 121, 180, 109, 220, 225, 448, 289, 756, 487, 500, 495, 484, 529, 1008, 725, 436, 2187, 1100, 841, 900, 1081, 2048, 1089, 1156, 1375, 3780, 973, 1948, 981, 2800, 1681, 1980, 1513, 2420, 4725, 2116, 2209, 4032
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 25 2001

Keywords

Comments

Equivalently, the number of solutions to x^3 + y^3 + z^3 == 0 (mod n). - Andrew Howroyd, Jul 18 2018

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), this sequence (k=3), A288099 (k=4), A288100 (k=5), A288101 (k=6), A288102 (k=7), A288103 (k=8), A288104 (k=9), A288105 (k=10).

Programs

  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^(i^3%n)), 1-x^n)); polcoeff(lift(p^3), 0)} \\ Andrew Howroyd, Jul 18 2018
    
  • Python
    def A063454(n):
        ndict = {}
        for i in range(n):
            m = pow(i,3,n)
            if m in ndict:
                ndict[m] += 1
            else:
                ndict[m] = 1
        count = 0
        for i in ndict:
            ni = ndict[i]
            for j in ndict:
                k = (i+j) % n
                if k in ndict:
                    count += ni*ndict[j]*ndict[k]
        return count # Chai Wah Wu, Jun 06 2017

Extensions

More terms from Dean Hickerson, Jul 26 2001

A288099 Number of solutions to x^4 + y^4 = z^4 mod n.

Original entry on oeis.org

1, 4, 9, 24, 33, 36, 49, 192, 99, 132, 121, 216, 97, 196, 297, 1536, 193, 396, 361, 792, 441, 484, 529, 1728, 925, 388, 1377, 1176, 1121, 1188, 961, 6144, 1089, 772, 1617, 2376, 1441, 1444, 873, 6336, 481, 1764, 1849, 2904, 3267, 2116, 2209, 13824, 2695, 3700, 1737
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), this sequence (k=4), A288100 (k=5), A288101 (k=6), A288102 (k=7), A288103 (k=8), A288104 (k=9), A288105 (k=10).

Programs

  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^lift(Mod(i,n)^4)), 1-x^n)); vecsum(Vec( serconvol(lift(p^2) + O(x^n), lift(p) + O(x^n))))} \\ Andrew Howroyd, Jul 17 2018

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A288100 Number of solutions to x^5 + y^5 = z^5 mod n.

Original entry on oeis.org

1, 4, 9, 20, 25, 36, 49, 112, 99, 100, 151, 180, 169, 196, 225, 704, 289, 396, 361, 500, 441, 604, 529, 1008, 1625, 676, 1377, 980, 841, 900, 1951, 4864, 1359, 1156, 1225, 1980, 1369, 1444, 1521, 2800, 601, 1764, 1849, 3020, 2475, 2116, 2209, 6336, 2695, 6500, 2601
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Comments

Equivalently, the number of solutions to x^5 + y^5 + z^5 == 0 (mod n). - Andrew Howroyd, Jul 17 2018

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), A288099 (k=4), this sequence (k=5), A288101 (k=6), A288102 (k=7), A288103 (k=8), A288104 (k=9), A288105 (k=10).

Programs

  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^lift(Mod(i,n)^5)), 1-x^n)); polcoeff(lift(p^3), 0)} \\ Andrew Howroyd, Jul 17 2018

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A288101 Number of solutions to x^6 + y^6 = z^6 mod n.

Original entry on oeis.org

1, 4, 9, 24, 25, 36, 73, 192, 243, 100, 121, 216, 217, 292, 225, 1024, 289, 972, 217, 600, 657, 484, 529, 1728, 725, 868, 2673, 1752, 841, 900, 1441, 6144, 1089, 1156, 1825, 5832, 3241, 868, 1953, 4800, 1681, 2628, 505, 2904, 6075, 2116, 2209, 9216, 3871, 2900, 2601
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), A288099 (k=4), A288100 (k=5), this sequence (k=6), A288102 (k=7), A288103 (k=8), A288104 (k=9), A288105 (k=10).

Programs

  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^lift(Mod(i,n)^6)), 1-x^n)); vecsum(Vec( serconvol(lift(p^2) + O(x^n), lift(p) + O(x^n))))} \\ Andrew Howroyd, Jul 17 2018

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A288102 Number of solutions to x^7 + y^7 = z^7 mod n.

Original entry on oeis.org

1, 4, 9, 20, 25, 36, 49, 112, 99, 100, 121, 180, 169, 196, 225, 704, 289, 396, 361, 500, 441, 484, 529, 1008, 725, 676, 1377, 980, 589, 900, 961, 4864, 1089, 1156, 1225, 1980, 1369, 1444, 1521, 2800, 1681, 1764, 4999, 2420, 2475, 2116, 2209, 6336, 10633, 2900
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Comments

Equivalently, the number of solutions to x^7 + y^7 + z^7 == 0 (mod n). - Andrew Howroyd, Jul 17 2018

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), A288099 (k=4), A288100 (k=5), A288101 (k=6), this sequence (k=7), A288103 (k=8), A288104 (k=9), A288105 (k=10).

Programs

  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^lift(Mod(i,n)^7)), 1-x^n)); polcoeff(lift(p^3), 0)} \\ Andrew Howroyd, Jul 17 2018

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A288103 Number of solutions to x^8 + y^8 = z^8 mod n.

Original entry on oeis.org

1, 4, 9, 24, 33, 36, 49, 192, 99, 132, 121, 216, 97, 196, 297, 1536, 385, 396, 361, 792, 441, 484, 529, 1728, 925, 388, 1377, 1176, 1121, 1188, 961, 12288, 1089, 1540, 1617, 2376, 1441, 1444, 873, 6336, 641, 1764, 1849, 2904, 3267, 2116, 2209, 13824, 2695, 3700
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), A288099 (k=4), A288100 (k=5), A288101 (k=6), A288102 (k=7), this sequence (k=8), A288104 (k=9), A288105 (k=10).

Programs

  • Mathematica
    Table[cnt=0; Do[If[Mod[x^8 + y^8 - z^8, n]==0, cnt++], {x, 0, n-1}, {y, 0, n-1}, {z, 0, n-1}]; cnt, {n, 50}] (* Vincenzo Librandi, Jul 18 2018 *)
  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^lift(Mod(i,n)^8)), 1-x^n)); vecsum(Vec( serconvol(lift(p^2) + O(x^n), lift(p) + O(x^n))))} \\ Andrew Howroyd, Jul 17 2018

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A288104 Number of solutions to x^9 + y^9 = z^9 mod n.

Original entry on oeis.org

1, 4, 9, 20, 25, 36, 55, 112, 189, 100, 121, 180, 109, 220, 225, 704, 289, 756, 487, 500, 495, 484, 529, 1008, 725, 436, 5103, 1100, 841, 900, 1081, 4864, 1089, 1156, 1375, 3780, 973, 1948, 981, 2800, 1681, 1980, 1513, 2420, 4725, 2116, 2209, 6336, 2989, 2900, 2601
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Comments

Equivalently, the number of solutions to x^9 + y^9 + z^9 == 0 (mod n). - Andrew Howroyd, Jul 17 2018

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), A288099 (k=4), A288100 (k=5), A288101 (k=6), A288102 (k=7), A288103 (k=8), this sequence (k=9), A288105 (k=10).

Programs

  • Mathematica
    Table[cnt=0; Do[If[Mod[x^9 + y^9 - z^9, n]==0, cnt++], {x, 0, n-1}, {y, 0, n-1}, {z, 0, n-1}]; cnt, {n, 50}] (* Vincenzo Librandi, Jul 18 2018 *)
  • PARI
    a(n)={my(p=Mod(sum(i=0, n-1, x^lift(Mod(i,n)^9)), 1-x^n)); polcoeff(lift(p^3), 0)} \\ Andrew Howroyd, Jul 17 2018
    
  • Python
    def A288104(n):
        ndict = {}
        for i in range(n):
            m = pow(i,9,n)
            if m in ndict:
                ndict[m] += 1
            else:
                ndict[m] = 1
        count = 0
        for i in ndict:
            ni = ndict[i]
            for j in ndict:
                k = (i+j) % n
                if k in ndict:
                    count += ni*ndict[j]*ndict[k]
        return count # Chai Wah Wu, Jun 05 2017

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A288105 Number of solutions to x^10 + y^10 = z^10 mod n.

Original entry on oeis.org

1, 4, 9, 24, 25, 36, 49, 192, 99, 100, 201, 216, 169, 196, 225, 1024, 289, 396, 361, 600, 441, 804, 529, 1728, 3125, 676, 1377, 1176, 841, 900, 601, 6144, 1809, 1156, 1225, 2376, 1369, 1444, 1521, 4800, 1201, 1764, 1849, 4824, 2475, 2116, 2209, 9216, 2695, 12500
Offset: 1

Views

Author

Seiichi Manyama, Jun 05 2017

Keywords

Crossrefs

Number of solutions to x^k + y^k = z^k mod n: A062775 (k=2), A063454 (k=3), A288099 (k=4), A288100 (k=5), A288101 (k=6), A288102 (k=7), A288103 (k=8), A288104 (k=9), this sequence (k=10).

Programs

  • Mathematica
    Table[cnt=0; Do[If[Mod[x^10 + y^10 - z^10, n]==0, cnt++], {x, 0, n-1}, {y, 0, n-1}, {z, 0, n-1}]; cnt, {n, 50}] (* Vincenzo Librandi, Jul 18 2018 *)
  • Python
    def A288105(n):
        ndict = {}
        for i in range(n):
            m = pow(i,10,n)
            if m in ndict:
                ndict[m] += 1
            else:
                ndict[m] = 1
        count = 0
        for i in ndict:
            ni = ndict[i]
            for j in ndict:
                k = (i+j) % n
                if k in ndict:
                    count += ni*ndict[j]*ndict[k]
        return count # Chai Wah Wu, Jun 05 2017

Extensions

Keyword:mult added by Andrew Howroyd, Jul 17 2018

A087687 Number of solutions to x^2 + y^2 + z^2 == 0 (mod n).

Original entry on oeis.org

1, 4, 9, 8, 25, 36, 49, 32, 99, 100, 121, 72, 169, 196, 225, 64, 289, 396, 361, 200, 441, 484, 529, 288, 725, 676, 891, 392, 841, 900, 961, 256, 1089, 1156, 1225, 792, 1369, 1444, 1521, 800, 1681, 1764, 1849, 968, 2475, 2116, 2209, 576, 2695, 2900, 2601
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

Keywords

Comments

To show that a(n) is multiplicative is simple number theory. If gcd(n,m)=1, then any solution of x^2 + y^2 + z^2 == 0 (mod n) and any solution (mod m) can combined to a solution (mod nm) using the Chinese Remainder Theorem and any solution (mod nm) gives solutions (mod n) and (mod m). Hence a(nm) = a(n)*a(m). - Torleiv Kløve, Jan 26 2009

Crossrefs

Different from A064549.

Programs

  • Maple
    A087687 := proc(n)
        a := 1;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 2 then
                a := a*p^(e+ceil(e/2)) ;
            elif type(e,'odd') then
                a := a*p^((3*e-1)/2)*(p^((e+1)/2)+p^((e-1)/2)-1) ;
            else
                a := a*p^(3*e/2-1)*(p^(e/2+1)+p^(e/2)-1) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A087687(n),n=1..100) ; # R. J. Mathar, Jun 25 2018
  • Mathematica
    a[n_] := Module[{k=1}, Do[{p, e} = pe; k = k*If[p == 2, p^(e + Ceiling[ e/2]), If[OddQ[e], p^((3*e-1)/2)*(p^((e+1)/2) + p^((e-1)/2) - 1), p^(3*e/2 - 1)*(p^(e/2 + 1) + p^(e/2) - 1)]], {pe, FactorInteger[n]}]; k];
    Array[a, 100] (* Jean-François Alcover, Jul 10 2018, after R. J. Mathar *)
  • PARI
    a(n)=local(v=vector(n),w);for(i=1,n,v[i^2%n+1]++);w=vector(n,i,sum(j=1,n,v[j]*v[(i-j)%n+1]));sum(j=1,n,w[j]*v[(1-j)%n+1]) \\ Martin Fuller
    
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my([p,e]=f[i,]); if(p==2, 2^(e+(e+1)\2), p^(e+(e-1)\2)*(p^(e\2)*(p+1) - 1)))} \\ Andrew Howroyd, Aug 06 2018

Formula

a(2^k) = 2^(k + ceiling(k/2)). For odd primes p, a(p^(2k-1)) = p^(3k-2)*(p^k + p^(k-1) - 1) and a(p^(2k)) = p^(3k-1)*(p^(k+1) + p^k - 1). - Martin Fuller, Jan 26 2009
Sum_{k=1..n} a(k) ~ (4*zeta(3))/(15*zeta(4)) * n^3 + O(n^2 * log(n)) (Calderón and de Velasco, 2000). - Amiram Eldar, Mar 04 2021

Extensions

More terms from Robert Gerbicz, Aug 22 2006
Edited by Steven Finch, Feb 06 2009, Feb 12 2009

A096018 Number of Pythagorean quadruples mod n; i.e., number of solutions to w^2 + x^2 + y^2 = z^2 mod n.

Original entry on oeis.org

1, 8, 21, 64, 145, 168, 301, 512, 621, 1160, 1221, 1344, 2353, 2408, 3045, 4096, 5185, 4968, 6517, 9280, 6321, 9768, 11661, 10752, 18625, 18824, 16281, 19264, 25201, 24360, 28861, 32768, 25641, 41480, 43645, 39744, 51985, 52136, 49413, 74240
Offset: 1

Views

Author

T. D. Noe, Jun 15 2004

Keywords

Crossrefs

Cf. A062775 (number of solutions to x^2 + y^2 = z^2 mod n), A240547.

Programs

  • Maple
    A096018 := proc(n)
        a := 1;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 2 then
                a := a*p^(3*e) ;
            elif modp(p,4) = 1 then
                a := a* p^(2*e-1)*(p^(e+1)+p^e-1) ;
            else
                if type(e,'even') then
                    a := a* (p^(3*e)+(p-1)*p^(2*e-1)*(1-p^e)/(1+p)) ;
                else
                    a := a* (p^(3*e)-(p-1)*p^(2*e-1)*(1+p^e)/(1+p)) ;
                end if;
            end if;
        end do:
        a ;
    end proc:
    seq(A096018(n),n=1..50) ; # R. J. Mathar, Jun 24 2018
  • Mathematica
    Table[cnt=0; Do[If[Mod[w^2+x^2+y^2-z^2, n]==0, cnt++ ], {w, 0, n-1}, {x, 0, n-1}, {y, 0, n-1}, {z, 0, n-1}]; cnt, {n, 50}]
    f[2, e_] := 2^(3*e); f[p_, e_] := If[Mod[p, 4] == 1, p^(2*e - 1)*(p^(e + 1) + p^e - 1), If[EvenQ[e], p^(3*e) + (p - 1)*p^(2*e - 1)*(1 - p^e)/(1 + p), p^(3*e) - (p - 1)*p^(2*e - 1)*(1 + p^e)/(1 + p)]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 11 2020 *)
  • PARI
    M(n,f)={sum(i=0, n-1, Mod(x^(f(i)%n), x^n-1))}
    a(n)={polcoeff(lift(M(n, i->i^2)^3 * M(n, i->-(i^2))), 0)} \\ Andrew Howroyd, Jun 23 2018
    
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; if(p == 2, 2^(3*e), if(p%4 == 1, p^(2*e-1)*(p^(e+1) + p^e - 1), if(e%2, p^(3*e) - (p - 1)*p^(2*e - 1)*(1 + p^e)/(1 + p), p^(3*e) + (p - 1)*p^(2*e - 1)*(1 - p^e)/(1 + p)))));} \\ Amiram Eldar, Nov 21 2023

Formula

a(n) is multiplicative. For the powers of primes p, there are several cases. For p=2, we have a(2^e) = 2^(3e). For odd primes p with p==1 (mod 4), we have a(p^e) = p^(2*e-1)*(p^(e+1)+p^e-1). For odd primes p with p==3 (mod 4) and even e we have a(p^e) = p^(3*e) +(p-1)*p^(2*e-1)*(1-p^e)/(1+p). For odd primes p == 3 (mod 4) and odd e we have a(p^e) = p^(3*e) -(p-1)*p^(2*e-1)*(1+p^e)/(1+p). [Corrected Jun 24 2018, R. J. Mathar]
Sum_{k=1..n} a(k) ~ c * n^4 / 4, where c = A334425 * A334426 /(A088539 * A243381) = 0.94532146880744347512... . - Amiram Eldar, Nov 21 2023
Showing 1-10 of 15 results. Next