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.

A305030 Number of pairs {k, m} with 0 <= k <= m such that binomial(2k,k) + binomial(2m,m) is not only a primitive root modulo prime(n) but also smaller than prime(n).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 24 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 1. In other words, any odd prime p has a primitive root g < p which is the sum of two central binomial coefficients.
Conjecture 2: Each odd prime p has a primitive root g < p which is the sum of two Catalan numbers.
We have verified Conjecture 1 for all odd primes p < 10^9.

Examples

			a(2) = 1 with binomial(2*0,0) + binomial(2*0,0) = 2 a primitive root modulo prime(2) = 3.
a(3) = 2 with binomial(2*0,0) + binomial(2*0,0) = 2 and binomial(2*0,0) + binomial(2*1,1) = 3 primitive roots modulo prime(3) = 5.
a(4) = 1 with binomial(2*0,0) + binomial(2*1,1) = 3 a primitive root modulo prime(4) = 7.
a(29) = 2 with binomial(2*3,3) + binomial(2*3,3) = 40 and binomial(2*1,1) + binomial(2*4,4) = 72 primitive roots modulo prime(29) = 109.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=Prime[n];
    Dv[n_]:=Dv[n]=Divisors[n];
    gp[g_,p_]:=gp[g,p]=Mod[g,p]>0&&Sum[Boole[PowerMod[g,Dv[p-1][[k]],p]==1],{k,1,Length[Dv[p-1]]-1}]==0;
    tab={};Do[r=0;a=0;Label[aa];If[Binomial[2a,a]>=p[n],Goto[cc]];b=0;Label[bb];If[b>a||Binomial[2b,b]>=p[n]-Binomial[2a,a],a=a+1;Goto[aa]];
    If[gp[Binomial[2a,a]+Binomial[2b,b],p[n]],r=r+1];b=b+1;Goto[bb];Label[cc];tab=Append[tab,r],{n,1,90}];Print[tab]