A261773 Number of full reptend primes p < n in base n.
0, 1, 0, 2, 0, 2, 2, 1, 1, 2, 2, 3, 1, 2, 0, 5, 2, 4, 3, 2, 3, 4, 4, 1, 2, 3, 5, 5, 2, 4, 5, 6, 3, 3, 0, 6, 4, 5, 6, 6, 4, 5, 5, 4, 4, 6, 7, 1, 5, 4, 8, 7, 5, 6, 7, 7, 6, 6, 5, 10, 6, 9, 0, 8, 4, 10, 6, 8, 4, 9, 9, 11, 7, 6, 7, 7, 8, 11, 8, 1, 7, 7, 8, 9, 8, 9, 8, 12, 7, 9, 10, 8, 5, 8, 9, 10, 11, 9
Offset: 2
Examples
a(10) = 1 since the only full reptend prime in base 10 less than 10 is 7. a(17) = 5 since the full reptend primes {2, 3, 5, 7, 11} in base 17 are all less than 17.
References
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 6th ed., Oxford Univ. Press, 2008, pp. 144-148.
Links
- Robert Israel, Table of n, a(n) for n = 2..10000
- OEIS Wiki, Full reptend primes.
- Eric Weisstein's World of Mathematics, Cyclic Number.
- Eric Weisstein's World of Mathematics, Full Reptend Prime.
Crossrefs
Cf. A001913.
Programs
-
Maple
f:= proc(n) nops(select(p -> isprime(p) and numtheory:-order(n,p) = p-1, [$2..n-1])) end proc: map(f, [$2..100]); # Robert Israel, Aug 31 2015
-
Mathematica
Count[Prime@ Range@ PrimePi@ #, n_ /; MultiplicativeOrder[#, n] == n - 1] & /@ Range[2, 99] (* Michael De Vlieger, Aug 31 2015 *)
-
PARI
a(n) = sum(k=2, n-1, if (isprime(k) && (n%k), znorder(Mod(n, k))==(k-1))); \\ Michel Marcus, Sep 04 2015
Comments