A307121 Number of Lucasian primes less than 10^n.
1, 4, 19, 100, 581, 3912, 28091, 211700, 1655601, 13286320, 109058381, 911436949, 7731247492
Offset: 1
Examples
There are 4 Lucasian primes below 10^2: {3,11,23,83}, therefore a(2) = 4.
Links
- Simon Davis, Arithmetical sequences for the exponents of composite Mersenne numbers, Notes on Number Theory and Discrete Mathematics 20, no. 1 (2014): 19-26.
Programs
-
Mathematica
c = 0; r = 10; s = {}; Do[If[p > r, AppendTo[s, c]; r *= 10]; If[PrimeQ[p] && PrimeQ[2p + 1], c++], {p, 3, 1000003, 4}]; s (* Amiram Eldar, Mar 27 2019 *) lucSophies = Select[4Range[2500000] - 1, PrimeQ[#] && PrimeQ[2# + 1] &]; Table[Length[Select[lucSophies, # < 10^n &]], {n, 0, 7}]
-
PARI
a(n) = { my(t=0); forprime(p=2,10^n,p%4==3 && ispseudoprime(1+(2*p)) && t++);t } \\ Dana Jacobsen, Mar 28 2019
-
Perl
use ntheory ":all"; sub a { my($n,$t)=(shift,0); forprimes { $t++ if ($&3) == 3 && is_prime(1+($<<1)) } 10**$n; $t; } # Dana Jacobsen, Mar 28 2019
Extensions
a(9)-a(11) from Amiram Eldar, Mar 27 2019
a(12) from Amiram Eldar, Mar 31 2019
a(13) from Dana Jacobsen, Apr 02 2019
Comments