This site is supported by donations to The OEIS Foundation.

 Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS". Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A194231 Numbers n such that at least one of n and n+2 is composite, while for every b coprime to n*(n+2), b^(n-1)==1 (mod n) and b^(n+1)==1 (mod n+2). 1
 561, 1103, 2465, 2819, 6599, 29339, 41039, 52631, 62743, 172079, 188459, 278543, 340559, 488879, 656599, 656601, 670031, 1033667, 1909001, 2100899, 3146219, 5048999, 6049679, 8719307, 10024559, 10402559, 10877579, 11119103, 12261059, 14913989, 15247619 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS These might be called "Carmichael pseudo-twin-primes". LINKS FORMULA For every b coprime to a(n)*(a(n)+2), 2*b^(a(n)+1)==(b^2-1)*(a(n)+2) (mod a(n)*(a(n)+2)). Conversely (Max Alekseyev), if for every b coprime to N*(N+2), 2*b^(N+1)==(b^2-1)*(N+2) (mod N*(N+2)), then N is in the sequence. - Vladimir Shevelev, Oct 14 2011 MAPLE with(numtheory): ic:= proc(n) local p;        if not issqrfree(n) then false      else for p in factorset(n) do             if irem (n-1, p-1)<>0 then return false fi           od; true        fi      end: a:= proc(n) option remember; local k;       for k from 2 +`if`(n=1, 1, a(n-1)) by 2 while         isprime(k) and isprime(k+2) or not (ic(k) and ic(k+2))       do od; k     end: seq(a(n), n=1..10);  # Alois P. Heinz, Oct 12 2011 MATHEMATICA terms = 31; bMax = 20(* sufficient for 31 terms *); coprimes[n_] := Select[ Range[bMax], CoprimeQ[#, n]&]; Reap[For[n = m = 1, m <= terms, n += 2, If[CompositeQ[n] || CompositeQ[n+2], If[AllTrue[coprimes[n(n+2)], PowerMod[#, n-1, n] == 1 && PowerMod[#, n+1, n+2] == 1&], Print["a(", m, ") = ", n]; Sow[n]; m++]]]][[2, 1]] (* Jean-François Alcover, Mar 28 2017 *) CROSSREFS Cf. A002997, A001567, A141232. Sequence in context: A085999 A224695 A137198 * A141705 A135721 A290486 Adjacent sequences:  A194228 A194229 A194230 * A194232 A194233 A194234 KEYWORD nonn AUTHOR Vladimir Shevelev, Oct 12 2011 STATUS approved

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