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.

A243403 Number of primes p < n such that p*(n-p) is a primitive root modulo prime(n).

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 3, 2, 3, 2, 1, 3, 3, 2, 3, 4, 4, 1, 4, 1, 2, 2, 5, 8, 5, 1, 1, 5, 3, 6, 6, 7, 6, 6, 4, 2, 4, 3, 6, 11, 6, 4, 3, 7, 6, 8, 3, 2, 10, 9, 6, 11, 2, 8, 9, 9, 5, 2, 5, 2, 3, 13, 5, 14, 8, 12, 7, 8, 9, 6, 13, 9, 4, 10, 3, 13, 12, 4, 8, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 04 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6.
We have verified this for all n = 7, ..., 2*10^5.

Examples

			a(18) = 1 since 17 is prime with 17*(18-17) = 17 a primitive root modulo prime(18) = 61.
a(20) = 1 since 11 is prime with 11*(20-11) = 99 a primitive root modulo prime(20) = 71.
a(26) = 1 since 2 is prime with 2*(26-2) = 48 a primitive root modulo prime(26) = 101.
a(27) = 1 since 17 is prime with 17*(27-17) = 170 a primitive root modulo prime(27) = 103.
		

Crossrefs

Programs

  • Mathematica
    dv[n_]:=Divisors[n]
    Do[m=0;Do[Do[If[Mod[(Prime[k]*(n-Prime[k]))^(Part[dv[Prime[n]-1],i]),Prime[n]]==1,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,PrimePi[n-1]}];
    Print[n," ",m];Continue,{n,1,80}]