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.

Showing 1-7 of 7 results.

A241504 a(n) = |{0 < g < prime(n): g is not only a primitive root modulo prime(n) but also a partition number given by A000041}|.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 4, 3, 4, 4, 3, 4, 5, 3, 5, 4, 5, 3, 3, 5, 4, 4, 6, 5, 4, 6, 4, 6, 4, 3, 4, 4, 3, 7, 8, 5, 3, 6, 5, 8, 5, 2, 5, 7, 7, 6, 4, 7, 7, 2, 7, 5, 3, 6, 6, 10, 9, 5, 8, 7, 5, 10, 5, 5, 3, 8, 5, 5, 9, 4, 5, 5, 5, 8, 7, 10, 9, 6, 7, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 24 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0. In other words, any prime p has a primitive root g < p which is also a partition number.
(ii) Any prime p > 3 has a primitive root g < p which is also a strict partition number (i.e., a term of A000009).
We have checked part (i) for all primes p < 2*10^7, and part (ii) for all primes p < 5*10^6. See also A241516.

Examples

			a(92) = 1 since p(13) = 101 is a primitive root modulo prime(92) = 479, where p(.) is the partition function (A000041).
a(493) = 1 since p(20) = 627 is a primitive root modulo prime(493) = 3529.
a(541) = 1 since p(20) = 627 is a primitive root modulo prime(541) = 3911.
a(1146) = 1 since p(27) = 3010 is a primitive root modulo prime(1146) = 9241.
a(1951) = 1 since p(35) = 14883 is a primitive root modulo prime(1951) = 16921.
a(2380) = 1 since p(36) = 17977 is a primitive root modulo prime(2380) = 21169.
a(5629) = 1 since p(20) = 627 is a primitive root modulo prime(5629) = 55441.
		

Crossrefs

Programs

  • Mathematica
    f[k_]:=PartitionsP[k]
    dv[n_]:=Divisors[n]
    Do[m=0;Do[If[f[k]>Prime[n]-1,Goto[bb]];Do[If[Mod[f[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,Prime[n]-1}];Label[bb];Print[n," ",m];Continue,{n,1,80}]

A241516 Least positive primitive root g < prime(n) modulo prime(n) which is also a partition number given by A000041, or 0 if such a number g does not exist.

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 7, 3, 5, 2, 2, 2, 2, 7, 5, 3, 2, 3, 5, 2, 5, 2, 11, 3, 3, 2, 3, 2, 2, 7, 5, 2, 5, 2, 2, 2, 22, 5, 2, 3, 2, 3, 2, 7, 3, 7, 7, 11, 3, 5, 2, 15, 5, 3, 3, 2, 5, 22, 15, 2, 3, 15, 2, 2, 3, 7, 11, 2, 2, 5, 2, 5, 3, 22
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 24 2014

Keywords

Comments

According to the conjecture in A241504, a(n) should be always positive.

Examples

			a(4) = 3 since 3 = A000041(3) is a primitive root modulo prime(4) = 7, but neither 1 = A000041(1) nor 2 = A000041(2) is.
		

Crossrefs

Programs

  • Mathematica
    f[k_]:=PartitionsP[k]
    dv[n_]:=Divisors[n]
    Do[Do[If[f[k]>Prime[n]-1,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," ",PartitionsP[k]];Goto[bb];Label[aa];Continue,{k,1,Prime[n]-1}];Label[cc];Print[Prime[n]," ",0];Label[bb];Continue,{n,1,80}]

A241492 a(n) = |{0 < g < prime(n): g is a primitive root modulo prime(n) and g is a product of two consecutive integers}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 23 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4. In other words, any prime p > 7 has a primitive root g < p of the form k*(k+1).
We have verified this for all n = 5, ..., 2*10^5.
See also A239957 and A239963 for similar conjectures. Clearly, for any prime p > 3, one of the three numbers 1*2, 2*3, 3*4 is a quadratic residue modulo p.

Examples

			a(9) = 1 since 4*5 = 20 is a primitive root modulo prime(9) = 23.
a(10) = 1 since 1*2 = 2 is a primitive root modulo prime(10) = 29.
a(11) = 1 since 3*4 = 12 is a primitive root modulo prime(11) = 31.
		

Crossrefs

Programs

  • Mathematica
    f[k_]:=f[k]=k(k+1)
    dv[n_]:=dv[n]=Divisors[n]
    Do[m=0;Do[Do[If[Mod[f[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,(Sqrt[4*Prime[n]-3]-1)/2}];Print[n," ",m];Continue,{n,1,80}]

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]

A242266 a(n) = |{0 < g < prime(n): g is a primitive root mod prime(n) with g = sum_{j=1..k} prime(j) for some k > 0}|.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 2, 3, 2, 1, 3, 2, 2, 3, 3, 2, 3, 3, 1, 3, 2, 3, 3, 5, 2, 2, 6, 2, 4, 1, 3, 2, 3, 5, 2, 2, 2, 6, 6, 6, 7, 2, 6, 4, 4, 4, 5, 6, 5, 6, 3, 1, 3, 7, 9, 9, 2, 5, 2, 2, 6, 4, 5, 6, 6, 4, 3, 8, 3, 6, 6, 7, 5, 6, 9, 8, 6, 4, 4
Offset: 1

Views

Author

Zhi-Wei Sun, May 09 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. In other words, for any odd prime p, there is a positive integer k such that the sum of the first k primes is not only a primitive root modulo p but also smaller than p.
(ii) For any n > 1, there is a number k among 1, ..., n such that sum_{j=1..k}(-1)^(k-j)*prime(j) is a primitive root modulo prime(n).
We have verified parts (i) and (ii) for n up to 700000 and 250000 respectively. Note that prime(700000) > 10^7.

Examples

			a(4) = 1 since prime(1) + prime(2) = 2 + 3 = 5 is a primitive root modulo prime(4) = 7 with 5 < 7.
a(7) = 2 since prime(1) = 2 and prime(1) + prime(2) + prime(3) = 2 + 3 + 5 = 10 are not only primitive roots modulo prime(7) = 17 but also smaller than 17.
a(53) = 1 since sum_{j=1..10} prime(j) = 129 is a primitive root modulo prime(53) = 241 with 129 < 241.
		

Crossrefs

Programs

  • Mathematica
    f[0]=0
    f[n_]:=Prime[n]+f[n-1]
    dv[n_]:=Divisors[n]
    Do[m=0;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}];m=m+1;Label[aa];Continue,{k,1,n}];Label[cc];Print[n," ",m];Continue,{n,1,80}]

A305048 Number of ordered pairs (k, m) of nonnegative integers such that 5^k + 10^m is not only a primitive root modulo prime(n) but also smaller than prime(n).

Original entry on oeis.org

0, 1, 1, 0, 2, 3, 2, 2, 2, 4, 1, 3, 5, 1, 4, 3, 3, 4, 2, 2, 3, 2, 4, 4, 2, 5, 4, 4, 2, 2, 2, 4, 4, 6, 6, 4, 3, 3, 7, 6, 6, 2, 4, 3, 5, 3, 2, 3, 8, 3, 4, 4, 1, 3, 5, 5, 6, 5, 6, 4, 3, 5, 1, 1, 3, 4, 4, 2, 7, 2, 4, 4, 2, 8, 3, 7, 7, 3, 5, 4, 6, 1, 3, 4, 4, 7, 5, 4, 6, 2
Offset: 1

Views

Author

Zhi-Wei Sun, May 24 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4. In other words, any prime p > 7 has a primitive root g < p of the form 5^k + 10^m with k and m nonnegative integers.
We have verified this for any prime p > 7 not exceeding 10^9.
It seems that a(n) = 1 only for n = 2, 3, 11, 14, 53, 63, 64, 82, 99, 101, 111, 129, 344, 369, 391, 795, 1170, 1587, 5629, 5718, 6613, 430516.
See also A305048 for similar conjectures.

Examples

			a(14) = 1 with 5^2 + 10^0 = 26 a primitive root modulo prime(14) = 43.
a(101) = 1 with 5^0 + 10^0 = 2 a primitive root modulo prime(101) = 547.
a(111) = 1 with 5^2 + 10 = 35 a primitive root modulo prime(111) = 607.
a(5718) = 1 with 5^0 + 10^3 = 1001 a primitive root modulo prime(5718) = 56401.
a(6613) = 1 with 5^1 + 10^3 = 1005 a primitive root modulo prime(6613) = 66301.
a(430516) = 1 with 5^5 + 10^1 = 3135 a primitive root modulo prime(430516) = 6276271.
		

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;Do[If[gp[5^a+10^b,p[n]],r=r+1],{a,0,Log[5,p[n]-1]},{b,0,Log[10,p[n]-5^a]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A331506 Least primitive root g < prime(n) of the n-th prime with g a product of two Fibonacci numbers, or 0 if such a number g does not exist.

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 6, 3, 5, 2, 2, 2, 2, 13, 5, 3, 2, 3, 5, 2, 5, 2, 6, 3, 3, 2, 3, 2, 2, 6, 5, 2, 5, 2, 2, 2, 21, 5, 2, 3, 2, 3, 2, 6, 3, 13, 13, 6, 3, 5, 2, 6, 5, 3, 3, 2, 5, 34, 10, 2, 3, 10, 2, 2, 3, 13, 6, 2, 2, 5, 2, 5, 3, 21, 2, 2, 13, 5, 15, 2, 3, 13, 2, 3, 2, 13, 3, 2, 10, 5, 2, 3, 2, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 18 2020

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0. In other words, for each prime p there are two Fibonacci numbers F(k) and F(m) with F(k)*F(m) < p such that F(k)*F(m) is a primitive root modulo p.
This implies that for each odd prime p there exists a Fibonacci number F(k) < p which is a quadratic nonresidue modulo p.
It seems that Conjecture 1 can be strengthened as follows: For any prime p, there is a primitive root g < p modulo p such that g/F(2) = g or g/F(3) = g/2 or g/F(4) = g/3 is a Fibonacci number. We have verified this strong version for all primes p < 5*10^9.
We also have the following conjecture similar to Conjecture 1.
Conjecture 2. For any prime p, there are two Lucas numbers L(k) and L(m) with k >= m >= 0 and L(k)*L(m) < p such that L(k)*L(m) is a primitive root modulo p.
This has been verified for all primes p < 10^9.

Examples

			a(85) = 15 with 15 = 3*5 = F(4)*F(5) a primitive root modulo prime(85) = 439.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=Prime[n];
    Dv[n_]:=Dv[n]=Divisors[p[n]-1];
    ls={};
    Do[If[Fibonacci[k]Fibonacci[m]=p[n],tab=Append[tab,0];Goto[bb]];Do[If[PowerMod[ff[r],Dv[n][[i]],p[n]]==1,r=r+1;Goto[aa]],{i,1,Length[Dv[n]]-1}];tab=Append[tab,ff[r]];Label[bb],{n,1,100}];Print[tab]
Showing 1-7 of 7 results.