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 A378634 #15 Dec 03 2024 11:45:24 %S A378634 1,2,3,4,8,9,10,16,21,22,25,27,32,40,56,64,81,99,100,115,116,128,160, %T A378634 171,176,196,243,250,256,400,424,441,484,507,512,531,625,640,686,729, %U A378634 783,896,1000,1024,1246,1331,1408,1450,1600,1660,1701,1863,2048,2080,2086,2109,2187,2366,2401,2432 %N A378634 Numbers k such that for each odd prime dividing k, the previous prime divides k-1. %C A378634 If k is a term, then so are all powers of k. %C A378634 If p is an odd prime, then p^k is a term where k = A226367(A000720(p)-1) is the multiplicative order of p modulo A151799(p). %H A378634 Robert Israel, <a href="/A378634/b378634.txt">Table of n, a(n) for n = 1..500</a> %e A378634 a(7) = 10 is a term because the only odd prime dividing 10 is 5, and the previous prime 3 divides 10 - 1 = 9. %e A378634 a(8) = 16 is a term because 16 is not divisible by any odd prime. %e A378634 a(9) = 21 is a term because the odd primes dividing 21 are 3 and 7, and 2 (the prime previous to 3) and 5 (the prime previous to 7) both divide 21 - 1 = 20. %p A378634 filter:= n -> andmap(p -> n-1 mod prevprime(p) = 0, numtheory:-factorset(n) minus {2}): %p A378634 select(filter, [$1..3000]); %t A378634 Select[Range[2450], Function[k, Or[IntegerQ@ Log2[k], AllTrue[FactorInteger[k/2^IntegerExponent[k, 2] ][[All, 1]], Divisible[k - 1, NextPrime[#, -1] ] &] ] ] ] (* _Michael De Vlieger_, Dec 03 2024 *) %o A378634 (PARI) isok(k) = my(f=factor(k)); for (i=1, #f~, if ((f[i,1] % 2) && ((k-1) % precprime(f[i,1]-1)), return(0))); return(1); \\ _Michel Marcus_, Dec 02 2024 %Y A378634 Cf. A000720, A151799, A163619, A226367. %K A378634 nonn %O A378634 1,2 %A A378634 _Robert Israel_, Dec 02 2024