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-3 of 3 results.

A242210 Number of primes p < prime(n) such that the Bernoulli number B_{p-1} is a primitive root modulo prime(n).

Original entry on oeis.org

0, 0, 1, 2, 1, 2, 2, 1, 4, 2, 3, 6, 3, 2, 5, 6, 5, 7, 4, 6, 6, 10, 11, 12, 8, 10, 9, 12, 10, 13, 9, 9, 10, 10, 17, 11, 7, 11, 18, 22, 15, 11, 12, 15, 21, 15, 10, 15, 23, 18, 26, 15, 15, 22, 26, 22, 25, 19, 26, 22, 22, 20, 17, 23, 20, 28, 17, 18, 28, 22
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2. In other words, for any prime p > 3, there exists a prime q < p such that the Bernoulli number B_{q-1} is a primitive root modulo p.
(ii) For any prime p > 13, there exists a prime q < p such that the Euler number E_{q-1} is a primitive root modulo p.
We have verified part (i) for n up to 4.2*10^5, and part (ii) for primes p below 10^6.

Examples

			a(4) = 2 since 3 is a primitive root modulo prime(4) = 7, and both B_{2-1} = - 1/2 and B_{5-1} = - 1/30 are congruent to 3 modulo 7.
a(5) = 1 since B_{3-1} = 1/6 == 2 (mod 11) with 2 a primitive root modulo prime(5) = 11.
a(8) = 1 since B_{17-1} = -3617/510 == -4 (mod 19) with -4 a primitive root modulo prime(8) = 19.
		

Crossrefs

Programs

  • Mathematica
    rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2]
    f[k_]:=BernoulliB[Prime[k]-1]
    dv[n_]:=Divisors[n]
    Do[m=0;Do[If[rMod[f[k],Prime[n]]==0,Goto[aa]];Do[If[rMod[f[k]^(Part[dv[Prime[n]-1],i])-1,Prime[n]]==0,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,n-1}];Print[n," ",m];Continue,{n,1,70}]

A242222 Number of primes p <= (prime(n)+1)/2 such that the harmonic number H(p-1) = sum_{0

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 3, 1, 1, 1, 2, 3, 4, 4, 5, 6, 3, 2, 3, 2, 3, 2, 6, 6, 4, 6, 4, 8, 7, 9, 5, 7, 11, 5, 11, 5, 6, 6, 11, 8, 12, 7, 8, 9, 8, 11, 7, 13, 18, 8, 18, 14, 8, 9, 14, 18, 17, 7, 14, 11, 9, 19, 10, 12, 7, 21, 5, 15, 19, 15
Offset: 1

Views

Author

Zhi-Wei Sun, May 08 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3. In other words, for any prime p > 5, there exists a prime q <= (p+1)/2 such that the harmonic number H(q-1) = sum_{0

Examples

			a(6) = 1 since 7 is a prime not exceeding (prime(6)+1)/2 = 7, and H(7-1) = 49/20 == -6 (mod 13) with -6 a primitive root modulo prime(6) = 13.
a(8) = 1 since 5 is a prime not exceeding (prime(8)+1)/2 = 10, and H(5-1) = 25/12 == -9 (mod 19) with -9 a primitive root modulo prime(8) = 19.
a(9) = 1 since 11 is a prime not exceeding (prime(9)+1)/2 = 12, and H(11-1) = 7381/2520 == -9 (mod 23) with -9 a primitive root modulo prime(9) = 23.
		

Programs

  • Mathematica
    rMod[m_,n_]:=Mod[Numerator[m]*PowerMod[Denominator[m],-1,n],n,-n/2]
    f[k_]:=HarmonicNumber[Prime[k]-1]
    dv[n_]:=Divisors[n]
    Do[m=0;Do[If[rMod[f[k],Prime[n]]==0,Goto[aa]];Do[If[rMod[f[k]^(Part[dv[Prime[n]-1],i])-1,Prime[n]]==0,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,PrimePi[(Prime[n]+1)/2]}];Print[n," ",m];Continue,{n,1,70}]

A242241 Least prime p such that H(2,n) = sum_{k=1..n}1/k^2 == 0 (mod p) but there is no 0 < k < n with H(2,k) == 0 (mod p), or 1 if such a prime p does not exist.

Original entry on oeis.org

1, 5, 7, 41, 11, 13, 266681, 17, 19, 178939, 23, 18500393, 40799043101, 29, 31, 619, 601, 8821, 86364397717734821, 421950627598601, 2621, 295831, 47, 2237, 157, 53, 307, 7741, 6823, 61, 205883, 487, 67, 21767149, 71, 73, 149, 2004383, 79, 34033
Offset: 1

Author

Zhi-Wei Sun, May 09 2014

Keywords

Comments

Conjecture: (i) a(n) is prime for any n > 1.
(ii) For any prime p > 5, there exists a prime q < p/2 such that H(2,q-1) = sum_{0
See also A242222 and A242223 for similar conjectures involving harmonic numbers H(n) = sum_{k=1..n}1/k (n > 0).

Examples

			a(4) = 41 since H(2,4) = 5*41/(2^4*3^2) but none of H(2,1) = 1, H(2,2) = 5/2^2 and H(2,3) = 7^2/(2^2*3^2) is congruent to 0 modulo 41.
		

Programs

  • Mathematica
    h[n_]:=Numerator[HarmonicNumber[n,2]]
    f[n_]:=FactorInteger[h[n]]
    p[n_]:=p[n]=Table[Part[Part[f[n], k], 1], {k, 1, Length[f[n]]}]
    Do[If[h[n]<2, Goto[cc]]; Do[Do[If[Mod[h[i], Part[p[n], k]]==0, Goto[aa]], {i, 1, n-1}]; Print[n, " ", Part[p[n], k]]; Goto[bb]; Label[aa]; Continue, {k, 1, Length[p[n]]}]; Label[cc]; Print[n, " ", 1]; Label[bb]; Continue, {n,1,40}]
Showing 1-3 of 3 results.