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.

A242277 Least positive primitive root g < prime(n) mod prime(n) such that g is the sum of the first k primes for some k > 0, or 0 if such a number g does not exist.

This page as a plain text file.
%I A242277 #9 Aug 05 2019 04:41:16
%S A242277 0,2,2,5,2,2,5,2,5,2,17,2,17,5,5,2,2,2,2,28,5,28,2,28,5,2,5,2,10,5,58,
%T A242277 2,5,2,2,77,5,2,5,2,2,2,28,5,2,41,2,5,2,10,5,41,129,77,5,5,2,58,5,41,
%U A242277 5,2,5,17,10,2,28,10,2,2,5,28,10,2,2,5,2,5,17,28
%N A242277 Least positive primitive root g < prime(n) mod prime(n) such that g is the sum of the first k primes for some k > 0, or 0 if such a number g does not exist.
%C A242277 According to the conjecture in A242266, a(n) should be positive for all n > 1.
%H A242277 Zhi-Wei Sun, <a href="/A242277/b242277.txt">Table of n, a(n) for n = 1..10000</a>
%H A242277 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1405.0290">Notes on primitive roots modulo primes</a>, arXiv:1405.0290 [math.NT], 2014.
%e A242277 a(4) = 5 since 5 = 2 + 3 < 7 is a primitive root mod prime(4) = 7 but 2 is not.
%t A242277 f[0]=0
%t A242277 f[n_]:=Prime[n]+f[n-1]
%t A242277 dv[n_]:=Divisors[n]
%t A242277 Do[Do[If[f[k]>=Prime[n],Goto[cc]];Do[If[Mod[f[k]^(Part[dv[Prime[n]-1],i]),Prime[n]]==1,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];Print[n," ",f[k]];Goto[bb];Label[aa];Continue,{k,1,n}];Label[cc];Print[n," ",0];Label[bb];Continue,{n,1,80}]
%Y A242277 Cf. A000040, A007504, A242266.
%K A242277 nonn
%O A242277 1,2
%A A242277 _Zhi-Wei Sun_, May 10 2014