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.

A365100 Number of distinct residues of x^n (mod n^3), x=0..n^3-1.

Original entry on oeis.org

1, 3, 7, 6, 21, 8, 43, 18, 55, 22, 111, 20, 157, 44, 147, 65, 273, 56, 343, 30, 105, 112, 507, 68, 501, 158, 487, 110, 813, 88, 931, 257, 777, 274, 903, 140, 1333, 344, 371, 102, 1641, 64, 1807, 280, 1155, 508, 2163, 260, 2059, 502, 1911, 200, 2757, 488, 483, 374, 805, 814
Offset: 1

Views

Author

Albert Mukovskiy, Aug 21 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = #Set(vector(n^3, x, Mod(x-1,n^3)^n)); \\ Michel Marcus, Aug 22 2023
    
  • Python
    def A365100(n): return len({pow(x,n,n**3) for x in range(n**3)}) # Chai Wah Wu, Aug 23 2023

A365101 Number of distinct residues of x^n (mod n^4), x=0..n^4-1.

Original entry on oeis.org

1, 4, 21, 18, 101, 30, 295, 130, 487, 153, 1211, 170, 2029, 444, 1919, 1025, 4625, 732, 6499, 442, 1881, 1818, 11639, 1290, 12501, 3045, 13123, 2516, 23549, 1530, 28831, 8193, 23009, 6939, 29795, 4148, 49285, 9750, 12863, 3354, 67241, 1500, 77659, 10302, 49187, 17460, 101615
Offset: 1

Views

Author

Albert Mukovskiy, Aug 21 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = #Set(vector(n^4, x, Mod(x-1,n^4)^n)); \\ Michel Marcus, Aug 22 2023
    
  • Python
    def A365101(n): return len({pow(x,n,n**4) for x in range(n**4)}) # Chai Wah Wu, Aug 23 2023

A365099 Number of distinct residues of x^n (mod n^2), x=0..n^2-1.

Original entry on oeis.org

1, 2, 3, 2, 5, 4, 7, 3, 7, 6, 11, 4, 13, 8, 15, 5, 17, 8, 19, 4, 9, 12, 23, 6, 21, 14, 19, 8, 29, 12, 31, 9, 33, 18, 35, 8, 37, 20, 15, 6, 41, 8, 43, 12, 35, 24, 47, 10, 43, 22, 51, 8, 53, 20, 15, 12, 21, 30, 59, 8, 61, 32, 21, 17, 65, 24, 67, 10, 69, 24, 71, 12, 73, 38, 63
Offset: 1

Views

Author

Albert Mukovskiy, Aug 21 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = #Set(vector(n^2, x, Mod(x-1,n^2)^n)); \\ Michel Marcus, Aug 22 2023
    
  • Python
    def A365099(n): return len({pow(x,n,n**2) for x in range(n**2)}) # Chai Wah Wu, Aug 22 2023

A365104 Number of distinct quintic residues x^5 (mod 5^n), x=0..5^n-1.

Original entry on oeis.org

1, 5, 5, 21, 101, 501, 2505, 12505, 62521, 312601, 1563001, 7815005, 39075005, 195375021, 976875101, 4884375501, 24421877505, 122109387505, 610546937521, 3052734687601, 15263673438001, 76318367190005, 381591835950005, 1907959179750021, 9539795898750101, 47698979493750501, 238494897468752505, 1192474487343762505, 5962372436718812521, 29811862183594062601
Offset: 0

Views

Author

Albert Mukovskiy, Aug 24 2023

Keywords

Comments

It appears that for a prime p>2 the number of distinct residues x^p (mod p^n) is a(n) = (p-1)*p^(n-2) + a(n-p), with a(n<1)=1, a(1)=p.

Crossrefs

Programs

  • Mathematica
    a[n_]:=CountDistinct[Table[PowerMod[x-1, 5, 5^(n-1)], {x, 1, 5^(n-1)}]]; Array[a, 13]
  • Python
    def A365104(n): return len({pow(x,5,5**n) for x in range(5**n)}) # Chai Wah Wu, Sep 17 2023

Formula

For n >= 6, a(n) = 4*5^(n-2) + a(n-5) = 5*a(n-1) + a(n-5) - 5*a(n-6). O.g.f: (-5*x^5 - 4*x^4 - 4*x^3 - 20*x^2 + 1)/(5*x^6 - x^5 - 5*x + 1). - Max Alekseyev, Feb 19 2024

Extensions

Terms a(16) onward from Max Alekseyev, Feb 19 2024
Showing 1-4 of 4 results.