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.

User: Albert Mukovskiy

Albert Mukovskiy's wiki page.

Albert Mukovskiy has authored 11 sequences. Here are the ten most recent ones:

A367484 Number of integers of the form (x^4 + y^4) mod 3^n; a(n) = A289559(3^n).

Original entry on oeis.org

1, 3, 7, 19, 55, 165, 493, 1477, 4429, 13287, 39859, 119575, 358723, 1076169, 3228505, 9685513, 29056537
Offset: 0

Author

Albert Mukovskiy, Nov 19 2023

Keywords

Comments

It appears that for n > 4: a(n) = 2*3^(n-1) + a(n-4).
For n < 5: a(n) = 2*3^(n-1) + 1.
Conjecture in closed form: a(n) = 2*ceiling(3^(n+3)/80) - 1.

Crossrefs

Subsequence of A289559.

Programs

  • PARI
    a(n) = #setbinop((x, y)->Mod(x,3^n)^4+Mod(y,3^n)^4, [0..3^n-1]);
    
  • Python
    def A367484(n):
        m = 3**n
        return len({(pow(x,4,m)+pow(y,4,m))%m for x in range(m) for y in range(x+1)}) # Chai Wah Wu, Jan 23 2024

Formula

Conjecture: a(n) = 2*ceiling(3^(n+3)/80) - 1.
a(n) = A289559(3^n). - Thomas Scheuerle, Nov 20 2023

A366420 Number of distinct integers of the form (x^n + y^n) mod n^4.

Original entry on oeis.org

1, 9, 45, 35, 325, 95, 931, 259, 1215, 625, 6171, 627, 12337, 2210, 14625, 2049, 32657, 2435, 58843, 1683, 11025, 12105, 140185, 4883, 40625, 16055, 32805, 14586, 236321, 11875, 375751, 16385, 277695, 59245, 302575, 16071, 789913, 97475, 98865, 13107, 1413721, 9405, 1399693
Offset: 1

Author

Albert Mukovskiy, Oct 11 2023

Keywords

Comments

It is enough to take x,y from {0,1,...,n^3-1}.
It appears that the number of distinct integers of the form x^(p^k) + y^(p^k) (mod (p^k)^m) for a prime p>2 and natural k is A121278(p)*p^(k-1)*p^(k*(m-2)) for m>1. For m=1 see A366418.
It appears that the number of distinct integers of the form x^n + y^n (mod n^m) for an odd n, m>1 is A121278(n)*n^(m-2).

Crossrefs

Programs

  • PARI
    a(n) = #setbinop((x, y)->Mod(x, n^4)^n+Mod(y, n^4)^n, [0..n^3-1]); \\ Michel Marcus, Oct 14 2023
    
  • Python
    def A366420(n):
        m = n**4
        return len({(pow(x,n,m)+pow(y,n,m))%m for x in range(n**3) for y in range(x+1)}) # Chai Wah Wu, Nov 12 2023

A366419 Number of distinct integers of the form (x^n + y^n) mod n^3.

Original entry on oeis.org

1, 5, 15, 11, 65, 21, 133, 34, 135, 75, 561, 63, 949, 192, 975, 129, 1921, 165, 3097, 99, 525, 663, 6095, 231, 1625, 741, 1215, 576, 8149, 525, 12121, 513, 8415, 2091, 8645, 495, 21349, 3081, 2535, 363, 34481, 315, 32551, 1989, 8775, 5316, 51935, 903, 6517, 1875, 28815, 1062
Offset: 1

Author

Albert Mukovskiy, Oct 11 2023

Keywords

Comments

It is enough to take x,y from {0,1,...,n^2-1}.
It appears that the number of distinct integers of the form x^(p^k) + y^(p^k) mod (p^k)^m for a prime p>2 and natural k is A121278(p)*p^(k-1)*p^(k*(m-2)) for m>1. For m=1 see A366418.
It appears that the number of distinct integers of the form x^n + y^n mod n^m for an odd n, m>1 is A121278(n)*n^(m-2).

Crossrefs

Programs

  • PARI
    a(n) = #setbinop((x, y)->Mod(x, n^3)^n+Mod(y, n^3)^n, [0..n^2-1]); \\ Michel Marcus, Oct 14 2023
    
  • Python
    def A366419(n):
        m = n**3
        return len({(pow(x,n,m)+pow(y,n,m))%m for x in range(n**2) for y in range(x+1)}) # Chai Wah Wu, Nov 13 2023

A366418 Number of distinct integers of the form (x^n + y^n) mod n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 3, 5, 10, 11, 9, 13, 14, 15, 3, 17, 6, 19, 9, 15, 22, 23, 9, 13, 26, 5, 21, 29, 30, 31, 3, 33, 34, 35, 9, 37, 38, 39, 9, 41, 18, 43, 33, 25, 46, 47, 9, 19, 10, 51, 30, 53, 6, 25, 21, 57, 58, 59, 27, 61, 62, 25, 3, 65, 66, 67, 39, 69, 70, 71, 9, 73, 74, 39
Offset: 1

Author

Albert Mukovskiy, Oct 11 2023

Keywords

Comments

a(p) = p when p is prime. It appears that a(n) stabilizes for the subsequences n = k^m for each fixed k > 1 at large enough m.
a(n) = n if there are more than n/2 distinct integers x^n mod n. - David A. Corneth, Oct 16 2023

Crossrefs

Programs

  • PARI
    { a(n) = my(S,t); S=Set(); for(x=0, n-1, for(y=x, n-1, t=lift(Mod(x,n)^n+Mod(y,n)^n); S=setunion(S,[t]); ); ); #S }
    
  • PARI
    a(n) = #setbinop((x,y)->Mod(x,n)^n+Mod(y,n)^n, [0..n-1]); \\ Michel Marcus, Oct 12 2023
    
  • PARI
    See PARI link \\ David A. Corneth, Oct 16 2023

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

Original entry on oeis.org

1, 2, 2, 6, 18, 70, 274, 1094, 4370, 17478, 69906, 279622, 1118482, 4473926, 17895698, 71582790, 286331154, 1145324614, 4581298450, 18325193798, 73300775186, 293203100742, 1172812402962, 4691249611846, 18764998447378
Offset: 0

Author

Albert Mukovskiy, Aug 24 2023

Keywords

Comments

a(n) = A364811(2n).
For n>=2, A319281(a(n)) == 4^n + [n mod 2 == 1].
For n>=2, a(n)=k: [ A319281(k) == 4^n + [n mod 2 == 1] ].

Programs

  • Mathematica
    a[n_] = Ceiling[4^n/15] + Boole[Mod[n,2]==1]; Array[a, 24]
  • PARI
    a(n) = ceil(4^n/15)+(Mod(n,2)==1);
    
  • Python
    def A365103(n): return len({pow(x,4,1<<(n<<1)) for x in range(1<<(n<<1))}) # Chai Wah Wu, Sep 18 2023

Formula

a(n) = ceiling(4^n/15) + (n mod 2).

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

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 6, 10, 18, 36, 70, 138, 274, 548, 1094, 2186, 4370, 8740, 17478, 34954, 69906, 139812, 279622, 559242, 1118482, 2236964, 4473926
Offset: 0

Author

Albert Mukovskiy, Sep 14 2023

Keywords

Comments

For n>=4, A319281(a(n)) == 2^n + [(n mod 4)>0].
It appears that for n>4: a(n)=2*a(n-1)-2*[(n mod 4)==2]; a(n) = ceiling(2^n/15) - [(n mod 4)==0] + 1.

Crossrefs

Programs

  • Mathematica
    a[n_]:=CountDistinct[Table[PowerMod[x-1, 4, 2^(n-1)], {x, 1, 2^(n-1)}]]; Array[a, 24]
  • PARI
    a(n) = #Set(vector(2^(n-1), x, Mod(x-1, 2^(n-1))^4))
    
  • Python
    def A364811(n): return len({pow(x,4,1<Chai Wah Wu, Sep 17 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

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.

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

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

Original entry on oeis.org

1, 7, 57, 70, 501, 140, 2059, 1029, 4377, 1255, 13311, 1820, 26365, 5150, 27555, 16386, 78609, 10940, 123463, 8190, 37785, 33280, 267675, 28700, 312501, 65915, 354295, 66950, 682893, 35140, 893731, 262145, 732105, 196525, 1031559, 142220, 1823509, 308660
Offset: 1

Author

Albert Mukovskiy, Aug 22 2023

Keywords

Programs

  • Mathematica
    a[n_]:=CountDistinct[Table[PowerMod[x-1,n,n^5],{x,0,n^5-1}]]; Array[a,38] (* Stefano Spezia, Aug 24 2023 *)
  • PARI
    a(n) = #Set(vector(n^5, x, Mod(x-1, n^5)^n));
    
  • Python
    def A365102(n): return len({pow(x,n,n**5) for x in range(n**5)}) # 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

Author

Albert Mukovskiy, Aug 21 2023

Keywords

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

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

Author

Albert Mukovskiy, Aug 21 2023

Keywords

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