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.

A366906 The largest exponentially evil divisor of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 27, 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 27, 1, 8, 1, 1, 1, 1, 1, 1, 1, 64, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 8, 27, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Oct 27 2023

Keywords

Comments

The largest divisor of n that is an exponentially evil number (A262675).
The number of exponentially evil divisors of n is A366902(n) and their sum is A366904(n).

Crossrefs

Similar sequences: A353897, A365683, A366905.

Programs

  • Mathematica
    maxEvil[e_] := Module[{k = e}, While[OddQ[DigitCount[k, 2, 1]], k--]; k]; f[p_, e_] := p^maxEvil[e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    s(n) = {my(k = n); while(hammingweight(k)%2, k--); k;}
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^s(f[i, 2]));}

Formula

Multiplicative with a(p^e) = p^max{k=1..e, k evil}.
a(n) <= n, with equality if and only if n is exponentially evil number (A262675).
a(n) >= 1, with equality if and only if n is a cubefree number (A004709).