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.

A280015 a(n) is the least k such that A056619(k) = prime(n).

This page as a plain text file.
%I A280015 #13 Feb 23 2017 13:30:59
%S A280015 1,2,12,10,6,76,114,34,120,246,1386,616,1126,3774,510,8220,2634,25810,
%T A280015 57936,46836,12180,254940,54574,80040,497146,801780,402324,1003744,
%U A280015 6441196,2858890,27821214,14312640,47848164,25049814,8454126,45433894,4262890
%N A280015 a(n) is the least k such that A056619(k) = prime(n).
%C A280015 a(n) is the least number that is a primitive root mod prime(n) but not mod any lower prime.
%C A280015 Using the Chinese Remainder Theorem, it is easy to show that such k always exists.
%e A280015 10 is a primitive root mod prime(4) = 7, but not mod 2, 3 or 5.  This is the least number with that property, so a(4)=10.
%p A280015 a[1]:= 1: a[2]:= 2: p:= 3:
%p A280015 Cands:= {4,seq(seq(6*i+j,j=[0,4]),i=1..10^7)}:
%p A280015 for n from 3 while Cands <> {} do
%p A280015   p:= nextprime(p);
%p A280015   r:= numtheory:-primroot(p);
%p A280015   s:= select(t -> igcd(t,p-1)=1, {$1..p-1});
%p A280015   q:= map(t -> r &^t mod p, s);
%p A280015   R,Cands:= selectremove(t -> member(t mod p, q), Cands):
%p A280015   if R = {} then break fi;
%p A280015   a[n]:= min(R);
%p A280015 od:
%p A280015 seq(a[i],i=1..n-1);
%Y A280015 Cf. A056619.
%K A280015 nonn
%O A280015 1,2
%A A280015 _Robert Israel_, Feb 21 2017