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.
%I A385126 #9 Jun 25 2025 00:44:59 %S A385126 3,5,9,17,23,27,29,43,53,71,83,89,101,113,139,149,163,197,257,263,269, %T A385126 277,281,293,311,317,337,347,349,353,359,373,383,389,401,449,461,467, %U A385126 479,503,509,523,547,571,593,599,619,643,673,683,691,739,751,773,797,811,821,839,853,857,863,881 %N A385126 Hereditarily evil prime powers: numbers of the form p^k where p is prime and p^j is evil for 1 <= j <= k. %H A385126 Robert Israel, <a href="/A385126/b385126.txt">Table of n, a(n) for n = 1..10000</a> %e A385126 a(6) = 27 is a term because 3, 9 and 27 are all evil. %e A385126 The first term that is a fourth power is 277^4 = 5887339441. %e A385126 The first term that is a fifth power is 317^5 = 3201078401357. %p A385126 isevil:= proc(n) convert(convert(n,base,2),`+`)::even end proc: %p A385126 M:= 1000: # for terms <= M %p A385126 R:= NULL: %p A385126 p:= 1: %p A385126 do %p A385126 p:= nextprime(p); %p A385126 if p > M then break fi; %p A385126 for k from 1 do %p A385126 z:= p^k; %p A385126 if z > M then break fi; %p A385126 if isevil(z) then R:= R, z %p A385126 else break %p A385126 fi %p A385126 od %p A385126 od: %p A385126 sort([R]); %Y A385126 Cf. A001969. %Y A385126 Contains A027699. %K A385126 nonn,base %O A385126 1,1 %A A385126 _Robert Israel_, Jun 18 2025