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.

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

Views

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