A208154 6-Knödel numbers.
8, 10, 12, 18, 24, 30, 36, 42, 66, 72, 78, 84, 90, 102, 114, 126, 138, 168, 174, 186, 210, 222, 234, 246, 252, 258, 282, 318, 354, 366, 390, 396, 402, 426, 438, 456, 474, 498, 504, 534, 546, 582, 606, 618, 630, 642, 654, 678, 762, 786, 798, 822, 834, 894, 906
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Knödel Numbers.
Programs
-
Maple
with(numtheory); knodel:= proc(i,k) local a,n,ok; for n from k+1 to i do ok:=1; for a from 1 to n do if gcd(a,n)=1 then if (a^(n-k) mod n)<>1 then ok:=0; break; fi; fi; od; if ok=1 then print(n); fi; od; end: knodel(10000,6);
-
Mathematica
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 *)