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.

A108162 Least even pseudoprime > p to base p, where p = prime(n).

Original entry on oeis.org

161038, 286, 124, 16806, 70, 244, 1228, 906, 154, 52, 66, 66, 344, 526974, 506, 286, 946, 130, 154, 370, 276, 2626, 1558, 19126, 176, 190, 946, 742, 186, 176, 3486, 190, 148, 246, 412, 10930, 186, 186, 3818, 14444, 1246, 316, 286, 276, 532, 426, 310, 246
Offset: 1

Views

Author

Alexander Adamchuk, May 26 2007

Keywords

Comments

Some numbers appear as a multiple terms in a(n). For example, a(n) = 946 for n = {17,27,64,66,73,75,97,113,114,117,128,139,143,152,153,155} for corresponding prime p = {59,103,311,317,367,379,509,617,619,643,719,797,823,881,883,907}. There are some twin terms such that a(n) = a(n+1). For example, a(11) = a(12) = 66, a(37) = a(38) = 186, a(113) = a(114) = 946, a(152) = a(153) = 946, a(227) = a(228) = 2626.
The indices of records are 1, 14, 354, 549, 1302, 2679, 3743, 3998, 4627, 6880, ... with record values of 161038, 526974, 1234806, 1893126, 1930546, 3347398, 3860962, 5073706, 6376126, 61161946, ... - Amiram Eldar, Sep 10 2019

Crossrefs

Cf. A006935 (Even pseudoprimes (or primes) to base 2: n divides 2^n - 2, n even).

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n]}, k = p+1; If[OddQ[k], k++]; While[GCD[p, k] != 1 || PowerMod[p, k, k] != p, k+=2]; k]; Array[a, 100] (* Amiram Eldar, Sep 10 2019 *)