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.

A230495 a(n) is the minimal odd evil k, such that k^i, i=1,2,...,n, all are evil, and a(n)=0, if there is no such k.

Original entry on oeis.org

3, 3, 3, 27, 287, 287, 287, 287, 783, 783, 783, 19099, 20249, 34391, 80577, 92589, 211183, 211183, 211183, 1995137, 4270443, 4270443, 4270443, 4270443, 17026791, 317108969, 317108969, 317108969, 979104339, 979104339, 6044000725, 21911775681, 21911775681, 26576734759
Offset: 1

Views

Author

Keywords

Comments

We conjecture that a(n)>0 for all n.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := EvenQ[DigitCount[n, 2,1]]; a[n_] := Module[{k=3}, While[ LengthWhile[ Range[n], fQ[k^#] &] != n, k+=2]; k]; Array[a, 12] (* Amiram Eldar, Dec 10 2018 *)
  • PARI
    isevil(n) = (hammingweight(n) % 2) == 0; \\ A000069
    isok(k, n) = {if (!isevil(k), return (0)); for (i=1, n, if (!isevil(k^i), return (0));); return (1);}
    a(n) = {my(k=1); while(!isok(k,n), k += 2); k;}

Extensions

a(26) from Michel Marcus, Dec 10 2018
a(27)-a(34) from Amiram Eldar, Aug 03 2023