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

%I #24 Mar 28 2019 07:03:08

%S 4,6,8,10,12,24,28,30,70,88,130,238,510,754,868,910,1330,2068,2590,

%T 2728,3304,4002,5110,5406,8554,8710,12958,15748,18430,20878,21238,

%U 23902,24178,32422,39928,46870,49210,53590,55678,57358,62248,67858,70414,79378,88198,95038,95758,95788,102238,114478

%N -2-Knödel numbers.

%C 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.

%C All terms are even numbers.

%H Gheorghe Coserea, <a href="/A225506/b225506.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KnoedelNumbers.html">Knödel Numbers</a>

%p with(numtheory); ListA225506:=proc(q,k) local a,n,ok;

%p for n from 2 to q do if not isprime(n) then ok:=1; for a from 1 to n do

%p if gcd(a,n)=1 then if (a^(n-k)-1) mod n<>0 then ok:=0; break; fi; fi;

%p od; if ok=1 then print(n); fi; fi; od; end: ListA225506(10^6,-2);

%t Select[Range[10000], CompositeQ[#] && Divisible[# + 2, CarmichaelLambda[#]] &] (* _Amiram Eldar_, Mar 28 2019 *)

%o (PARI)

%o is(n) = forprime(p=3, n, if (n%p != 0 && Mod(p,n)^(n+2) != 1, return(0))); 1;

%o seq(N) = {

%o my(a=vector(N), k=0, n=4);

%o while(k < N, if(is(n), a[k++] = n); n += 2);

%o a;

%o };

%o seq(50) \\ _Gheorghe Coserea_, Dec 23 2018

%Y Cf. A208728.

%Y Cf. A225507, A225508, A225509, A225510, A225511, A225512, A225513, A225514.

%K nonn

%O 1,1

%A _Paolo P. Lava_, May 09 2013

%E More terms from _Gheorghe Coserea_, Dec 23 2018

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 March 29 04:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)