login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225506 -2-Knödel numbers. 9
4, 6, 8, 10, 12, 24, 28, 30, 70, 88, 130, 238, 510, 754, 868, 910, 1330, 2068, 2590, 2728, 3304, 4002, 5110, 5406, 8554, 8710, 12958, 15748, 18430, 20878, 21238, 23902, 24178, 32422, 39928, 46870, 49210, 53590, 55678, 57358, 62248, 67858, 70414, 79378, 88198, 95038, 95758, 95788, 102238, 114478 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Extension of k-Knödel numbers to k negative, in this case equal to -2. Composite numbers n > 0 such that if 1 < a < n and gcd(n,a) = 1 then a^(n+2) = 1 mod n.
All terms are even numbers.
LINKS
Eric Weisstein's World of Mathematics, Knödel Numbers
MAPLE
with(numtheory); ListA225506:=proc(q, k) local a, n, ok;
for n from 2 to q do if not isprime(n) then ok:=1; for a from 1 to n do
if gcd(a, n)=1 then if (a^(n-k)-1) mod n<>0 then ok:=0; break; fi; fi;
od; if ok=1 then print(n); fi; fi; od; end: ListA225506(10^6, -2);
MATHEMATICA
Select[Range[10000], CompositeQ[#] && Divisible[# + 2, CarmichaelLambda[#]] &] (* Amiram Eldar, Mar 28 2019 *)
PROG
(PARI)
is(n) = forprime(p=3, n, if (n%p != 0 && Mod(p, n)^(n+2) != 1, return(0))); 1;
seq(N) = {
my(a=vector(N), k=0, n=4);
while(k < N, if(is(n), a[k++] = n); n += 2);
a;
};
seq(50) \\ Gheorghe Coserea, Dec 23 2018
CROSSREFS
Cf. A208728.
Sequence in context: A359202 A096160 A181055 * A073669 A073670 A090169
KEYWORD
nonn
AUTHOR
Paolo P. Lava, May 09 2013
EXTENSIONS
More terms from Gheorghe Coserea, Dec 23 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 04:12 EDT 2024. Contains 371782 sequences. (Running on oeis4.)