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-2 of 2 results.

A192297 Lesser of pseudo twin primes to base 2.

Original entry on oeis.org

561, 643, 645, 1103, 1905, 2465, 2699, 2819, 4369, 4371, 4679, 6599, 10259, 12799, 14489, 16703, 18719, 19949, 23001, 25759, 25761, 29339, 30119, 31607, 33151, 39863, 41039, 42797, 49139, 52631, 55243, 60701, 62743, 68099, 72883, 83663, 85487, 87249, 90749
Offset: 1

Views

Author

Vladimir Shevelev, Oct 11 2011

Keywords

Comments

We call numbers {k,k+2} pseudo twin primes to base 2 if at least one of them is composite, while 2^(k-1) == 1 (mod k) and 2^(k+1) == 1 mod (k+2).
4369 is the only known term such that both k and k+2 are composite (cf. A173619). - Jianing Song, Nov 20 2021

Crossrefs

Programs

  • Maple
    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
              (2&^(k-1) mod k)<>1 or (2&^(k+1) mod (k+2))<>1
          do od; k
        end:
    seq (a(n), n=1..40);  # Alois P. Heinz, Oct 13 2011
  • Mathematica
    fQ[n_] := (! PrimeQ[n] || ! PrimeQ[n + 2]) && PowerMod[2, n - 1, n] == 1 && PowerMod[2, n + 1, n + 2] == 1; Select[2 Range@ 32000 + 1, fQ] (* Robert G. Wilson v, Oct 11 2011 *)
  • PARI
    is(n)=Mod(2,n^2+2*n)^(n+2)==3*n+8 && (!isprime(n) || !isprime(n+2)) && n>1 \\ Charles R Greathouse IV, Dec 02 2014

Formula

2^(a(n) + 2) == 3*a(n) + 8 (mod a(n)*(a(n)+2)).
4*(2^(a(n)-1)-1) == -a(n)*((a(n)-1)/2) (mod a(n)*(a(n)+2)). - Davide Rotondo, Nov 07 2021

A335326 Lesser of 2 consecutive Fermat pseudoprimes to base 2 with no prime numbers in between them.

Original entry on oeis.org

4369, 13741, 31609, 6973057, 208969201
Offset: 1

Views

Author

Amiram Eldar, Jun 01 2020

Keywords

Comments

The corresponding larger counterparts are 4371, 13747, 31621, 6973063, 208969223.
The corresponding gaps between the consecutive pseudoprimes are 2, 6, 12, 6, 22.
a(6) > 10^15, if it exists.

Examples

			4369 is a term since it is a Fermat pseudoprime to base 2, and between it and the next Fermat pseudoprime to base 2, 4371, there is only one number, 4370, which is composite.
		

Crossrefs

Programs

  • Mathematica
    psp = Cases[Import["https://oeis.org/A001567/b001567.txt", "Table"], {, }][[;; , 2]]; s = {}; Do[If[NextPrime[psp[[k]]] > psp[[k + 1]], AppendTo[s, psp[[k]]]], {k, 1, Length[psp] - 1}]; s
Showing 1-2 of 2 results.