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 A208154 #27 Feb 16 2025 08:33:16 %S A208154 8,10,12,18,24,30,36,42,66,72,78,84,90,102,114,126,138,168,174,186, %T A208154 210,222,234,246,252,258,282,318,354,366,390,396,402,426,438,456,474, %U A208154 498,504,534,546,582,606,618,630,642,654,678,762,786,798,822,834,894,906 %N A208154 6-Knödel numbers. %H A208154 Amiram Eldar, <a href="/A208154/b208154.txt">Table of n, a(n) for n = 1..10000</a> %H A208154 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KnoedelNumbers.html">Knödel Numbers</a>. %p A208154 with(numtheory); %p A208154 knodel:= proc(i,k) %p A208154 local a,n,ok; %p A208154 for n from k+1 to i do %p A208154 ok:=1; %p A208154 for a from 1 to n do %p A208154 if gcd(a,n)=1 then if (a^(n-k) mod n)<>1 then ok:=0; break; fi; fi; %p A208154 od; %p A208154 if ok=1 then print(n); fi; %p A208154 od; %p A208154 end: %p A208154 knodel(10000,6); %t A208154 knodelQ[m_Integer?PrimeQ, n_Integer] := False; knodelQ[m_Integer, n_Integer] := Module[{i = n + 1}, While[i < m && (GCD[i, m] > 1 || Mod[i^(m - n), m] == 1), i++]; (i == m)]; Select[Range[1000], knodelQ[#, 6] &] (* _Alonso del Arte_, Feb 24 2012 *) %Y A208154 Cf. A002997, A050990, A033553, A050992, A050993, A208155-A208158. %K A208154 nonn %O A208154 1,1 %A A208154 _Paolo P. Lava_, Feb 24 2012