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.

A379007 a(n) = (n^2) XOR ((n^2)-1).

Original entry on oeis.org

1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 511, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 2047, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 511, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 8191, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 511, 1, 7, 1, 31, 1, 7, 1, 127, 1, 7, 1, 31, 1, 7, 1, 2047
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Map[BitXor[#, # - 1] &, Range[100]^2] (* Paolo Xausa, Dec 18 2024 *)
  • PARI
    A379007(n) = bitxor(n^2, ((n^2)-1));
    
  • Python
    def A379007(n): return (m:=n**2)^m-1 # Chai Wah Wu, Dec 17 2024

Formula

Multiplicative with a(p^e) = 2^(1+2*e)-1 if p = 2; 1 if p > 2.
a(n) = A038712(A000290(n)).
a(n) = A000225(A037227(n)) = (2^(1+2*A007814(n))) - 1.
Dirichlet g.f.: zeta(s) * (2^s + 2)/(2^s - 4). - Amiram Eldar, Jan 12 2025