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.

A303531 Numbers k such that both k and (k+1)/2 are Fermat pseudoprimes to base 2 (A001567).

Original entry on oeis.org

31417, 130561, 41541241, 208969201, 224074369, 392099401, 851934601, 5186365801, 33847795741, 65096562721, 91625968981, 104070261901, 111794455501, 165814673473, 180007280041, 184020124201, 276032114281, 408164260141, 620052300421, 1240013784241, 1244667503017
Offset: 1

Views

Author

Max Alekseyev, Apr 25 2018

Keywords

Comments

Numbers (k+1)/2 are listed in A298758.

Crossrefs

Subsequence of each of A001567, A216822, and A217465.

Programs

  • Mathematica
    Select[Cases[Import["https://oeis.org/A001567/b001567.txt", "Table"], {, }][[;; , 2]], !PrimeQ[(#+1)/2] && PowerMod[2, (#-1)/2, (#+1)/2] == 1 &] (* Amiram Eldar, Nov 09 2023 *)
  • PARI
    isF(n) = {Mod(2, n)^n==2 && !isprime(n) && n>1};
    isok(n) = (n%2) && isF(n) && isF((n+1)/2); \\ Michel Marcus, Apr 26 2018

Formula

a(n) = 2*A298758(n) - 1.