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.

A336016 a(n) is the number of primes q less than primorial(n) having k = 2 as the least exponent such that q^k == 1 (mod primorial(n)).

Original entry on oeis.org

0, 1, 3, 5, 8, 19, 22, 51, 89, 145, 263, 453, 851, 1575, 2880, 5469, 10338, 19115, 35782, 67569, 128601, 243600, 463840, 883589
Offset: 1

Views

Author

Keywords

Comments

a(n) = length of row n of A336015 for n > 1.

Examples

			a(4) = 5 as there are 5 primes q coprime to primorial(4) = 210 such that 2 is the least positive integer exponent k where q^k == 1 (mod 210). Those primes are 29, 41, 71, 139, 181 and indeed we have 29^2 == 1 (mod 210), 41^2 == 1 (mod 210), 71^2 == 1 (mod 210), 139^2 == 1 (mod 210) and 181^2 == 1 (mod 210) and no more below 210. So as these are five such primes in row 4, a(4) = 5. - _David A. Corneth_, Aug 15 2020
		

Crossrefs

Programs

  • Mathematica
    Table[Block[{P = #, k = 0}, Do[If[MultiplicativeOrder[Prime@ i, P] == 2, k++], {i, PrimePi[n + 1], PrimePi[P - 1]}]; k] &@ Product[Prime@ j, {j, n}], {n, 8}]
  • PARI
    a(n) = {if(n <= 2, return(n-1)); my(pp = vecprod(primes(n))/2, d = divisors(pp), res = 0); for(i = 1, #d, c = lift(chinese(Mod(-1, d[i]), Mod(1, pp/d[i]))); forstep(i = c, pp*2, pp, if(isprime(i), res++ ) ) ); res } \\ David A. Corneth, Aug 16 2020

Extensions

New name from David A. Corneth, Aug 15 2020