cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A287591 Carmichael numbers k such that k-2 and k+2 are both primes.

Original entry on oeis.org

656601, 25536531021, 8829751133841, 60561233400921, 79934093254401, 352609909731201, 598438077923841, 976515437206401, 2122162714918401, 2789066007968241, 3767175573114801, 7881891474971361, 10740122274670881, 11512252145095521, 16924806963384321
Offset: 1

Views

Author

Amiram Eldar, May 26 2017

Keywords

Comments

Rotkiewicz conjectured that there are infinitely many Carmichael numbers k such that k-2 or k+2 are primes.
The terms were calculated using Pinch's tables of Carmichael numbers (see link below).

Examples

			656601 is in the sequence since it is a Carmichael number (A002997) and both 656599 and 656603 are primes.
		

Crossrefs

Subsequence of A258801.

A194231 Numbers k such that at least one of k and k+2 is composite, while for every b coprime to k*(k+2), b^(k-1) == 1 (mod k) and b^(k+1) == 1 (mod k+2).

Original entry on oeis.org

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
Offset: 1

Views

Author

Vladimir Shevelev, Oct 12 2011

Keywords

Comments

These might be called "Carmichael pseudo-twin-primes".

Crossrefs

Subsequences: A272754, A290692.

Programs

  • 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 *)

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

A290692 Carmichael numbers of the form p - 2 where p is a prime number.

Original entry on oeis.org

561, 2465, 656601, 1909001, 174352641, 230996949, 275283401, 939947009, 1534274841, 3264820001, 5860426881, 6025532241, 25536531021, 36709177121, 53388707681, 54519328481, 56222911361, 101536702401, 105528976961, 180481509681, 196866607601, 239862350001, 329245587161, 347469383801, 347511324161
Offset: 1

Views

Author

Altug Alkan, Aug 09 2017

Keywords

Comments

Rotkiewicz mentioned the first six terms of this sequence at the end of page 59 of his article (Links section). But his list includes 2821 and 46657 (2823 = 3 * 941 and 46659 = 3 * 103 * 151), which should not be there.
Carmichael numbers of the form p + 2 where p is a prime number are 1105, 2821, 6601, 29341, 41041, 52633, ... (see also A272754 for corresponding prime numbers).

Crossrefs

Programs

  • Maple
    # Using data file from Richard Pinch
    infile:= "carmichael-16": Res:= NULL;
    do
      S:= readline(infile);
      if S = 0 then break fi;
      L:= sscanf(S,"%d");
      if nops(L) <> 1 then break fi;
      if isprime(L[1]+2) then Res:= Res, L[1]; fi
    od:
    Res; # Robert Israel, Jun 03 2019
  • Mathematica
    Cases[Range[1, 10^7, 2], n_ /; And[Mod[n, CarmichaelLambda@ n] == 1, ! PrimeQ@ n, PrimeQ[n + 2]]] (* Michael De Vlieger, Aug 09 2017, after Artur Jasinski at A002997 *)
  • PARI
    isA002997(n) = {my(f); bittest(n, 0) && !for(i=1, #f=factor(n)~, (f[2, i]==1 && n%(f[1, i]-1)==1)||return) && #f>1}
    isok(n) = isprime(n+2) && isA002997(n)

Extensions

More terms from Robert Israel, Jun 03 2019
Showing 1-3 of 3 results.