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.

A271669 Smallest k > n such that n divides k and n^k == n (mod k).

Original entry on oeis.org

2, 161038, 6, 12, 10, 30, 14, 56, 18, 30, 22, 132, 26, 182, 30, 48, 34, 306, 38, 380, 42, 66, 46, 552, 50, 130, 54, 84, 58, 870, 62, 992, 66, 102, 70, 180, 74, 1406, 78, 120, 82, 1722, 86, 1892, 90, 138, 94, 2256, 98, 350, 102, 156, 106, 2862, 110, 280, 114, 174, 118, 3540
Offset: 1

Views

Author

Thomas Ordowski, Apr 12 2016

Keywords

Examples

			Because of the definition of (pseudo)primes to base 2, a(2) is the least element of A006935 greater than 2. - _Altug Alkan_, Apr 12 2016
		

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[n + 1, 10^6], Function[k, Divisible[k, n] && PowerMod[n, k, k] == Mod[n, k]]], {n, 60}] (* Michael De Vlieger, Apr 12 2016, Version 10 *)
    skn[n_]:=Module[{k=2n},While[PowerMod[n,k,k]!=n,k=k+n];k]; Array[skn,60] (* Harvey P. Dale, Jan 20 2025 *)
  • PARI
    a(n) = {k = n+1; while( !(((k % n)==0) && (Mod(n,k)^k == Mod(n, k))), k++); k;} \\ Michel Marcus, Apr 12 2016

Formula

a(n) = 2n for odd n. - Robert Israel, Apr 12 2016
a(n) = n * A102457(n) for n > 1. - Thomas Ordowski, Apr 13 2016

Extensions

More terms from Michel Marcus, Apr 12 2016