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.

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