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.

A272754 Primes p such that p + 2 is a Carmichael number (A002997).

Original entry on oeis.org

1103, 2819, 6599, 29339, 41039, 52631, 62743, 172079, 188459, 278543, 340559, 488879, 656599, 670031, 1033667, 2100899, 3146219, 5048999, 6049679, 8719307, 10024559, 10402559, 10877579, 11119103, 12261059, 14913989, 15247619, 15829631, 15888311, 17315999, 17812079, 18900971, 25603199, 26921087
Offset: 1

Views

Author

Altug Alkan, May 05 2016

Keywords

Comments

Because of Korselt's criterion, prime p is a member of this sequence if and only if p+2 is composite squarefree and q-1 divides p+1 for every prime q dividing p+2.

Examples

			1103 is a term because 1103 is prime and 1105 is a Carmichael number.
		

Crossrefs

Programs

  • Mathematica
    Select[Cases[Range[1, 10^7, 2], n_ /; Mod[n, CarmichaelLambda[n]] == 1 && ! PrimeQ[n]] - 2, PrimeQ] (* Michael De Vlieger, May 05 2016, 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}
    lista(nn) = forprime(p=2, nn, if(isA002997(p+2), print1(p, ", ")));