login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A379007
a(n) = (n^2) XOR ((n^2)-1).
3
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,2
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.
MATHEMATICA
Map[BitXor[#, # - 1] &, Range[100]^2] (* Paolo Xausa, Dec 18 2024 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,mult,new
AUTHOR
Antti Karttunen, Dec 16 2024
STATUS
approved