

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)).


2



0, 1, 3, 5, 8, 19, 22, 51, 89, 145, 263, 453, 851, 1575, 2880, 5469, 10338, 19115, 35782, 67569, 128601, 243600, 463840, 883589
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

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


LINKS

Table of n, a(n) for n=1..24.


EXAMPLE

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


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}]


PROG

(PARI) a(n) = {if(n <= 2, return(n1)); 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


CROSSREFS

Cf. A000010, A002110, A005867, A131577, A336015.
Sequence in context: A240532 A184434 A196140 * A240154 A112656 A002366
Adjacent sequences: A336013 A336014 A336015 * A336017 A336018 A336019


KEYWORD

nonn,more


AUTHOR

Michael De Vlieger, David James Sycamore, David A. Corneth, Jul 10 2020


EXTENSIONS

New name from David A. Corneth, Aug 15 2020


STATUS

approved



