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.

A085398 Let Cn(x) be the n-th cyclotomic polynomial; a(n) is the least k>1 such that Cn(k) is prime.

Original entry on oeis.org

3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 6, 2, 4, 3, 2, 10, 2, 22, 2, 2, 4, 6, 2, 2, 2, 2, 2, 14, 3, 61, 2, 10, 2, 14, 2, 15, 25, 11, 2, 5, 5, 2, 6, 30, 11, 24, 7, 7, 2, 5, 7, 19, 3, 2, 2, 3, 30, 2, 9, 46, 85, 2, 3, 3, 3, 11, 16, 59, 7, 2, 2, 22, 2, 21, 61, 41, 7, 2, 2, 8, 5, 2, 2
Offset: 1

Views

Author

Don Reble, Jun 28 2003

Keywords

Comments

Conjecture: a(n) is defined for all n. - Eric Chen, Nov 14 2014
Existence of a(n) is implied by Bunyakovsky's conjecture. - Robert Israel, Nov 13 2014

Examples

			a(11) = 5 because C11(k) is composite for k = 2, 3, 4 and prime for k = 5.
a(37) = 61 because C37(k) is composite for k = 2, 3, 4, ..., 60 and prime for k = 61.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
    for k from 2 do if isprime(numtheory:-cyclotomic(n,k)) then return k fi od
    end proc:
    seq(f(n), n = 1 .. 100); # Robert Israel, Nov 13 2014
  • Mathematica
    Table[k = 2; While[!PrimeQ[Cyclotomic[n, k]], k++]; k, {n, 300}] (* Eric Chen, Nov 14 2014 *)
  • PARI
    a(n) = k=2; while(!isprime(polcyclo(n, k)), k++); k; \\ Michel Marcus, Nov 13 2014

Formula

a(A072226(n)) = 2. - Eric Chen, Nov 14 2014
a(n) = A117544(n) except when n is a prime power, since if n is a prime power, then A117544(n) = 1. - Eric Chen, Nov 14 2014
a(prime(n)) = A066180(n), a(2*prime(n)) = A103795(n), a(2^n) = A056993(n-1), a(3^n) = A153438(n-1), a(2*3^n) = A246120(n-1), a(3*2^n) = A246119(n-1), a(6^n) = A246121(n-1), a(5^n) = A206418(n-1), a(6*A003586(n)) = A205506(n), a(10*A003592(n)) = A181980(n).