A080840
Number of cousin primes < 10^n.
Original entry on oeis.org
1, 8, 41, 203, 1216, 8144, 58622, 440258, 3424680, 27409999, 224373161, 1870585459, 15834656003, 135779962760, 1177207270204
Offset: 1
-
{c=0; p=5; for(n=1,9, while(p<10^n,if(isprime(p-4),c++); p=nextprime(p+1)); print1(c,","))}
A152127
Sum of cousin primes < 10^n.
Original entry on oeis.org
28, 766, 34522, 1706602, 107863996, 7379208796, 542100094312, 41248685420836, 3233516261489332, 260607555289408894, 21446383929686290726, 1795656778320649469818, 152541729206365604807782
Offset: 1
(3,7) and (7,11) are the cousin primes < 10. These add up to 28 the first entry in the sequence.
-
lista(pmax) = {my(sm = 10, prev = 2, pow = 10); forprime(p = 3, pmax, if(p == prev + 4, sm += (prev + p)); if(p > pow, print1(sm, ", "); pow *= 10); prev = p);} \\ Amiram Eldar, Jul 06 2024
A240167
Lesser of the first cousin prime pair with n digits.
Original entry on oeis.org
3, 13, 103, 1009, 10099, 100189, 1000033, 10000453, 100000123, 1000000093, 10000000597, 100000000069, 1000000000189, 10000000000279, 100000000001173, 1000000000000399, 10000000000001719, 100000000000002733, 1000000000000002493, 10000000000000000087
Offset: 1
-
a(n)=my(p=nextprime(10^(n-1))); while(!isprime(p+4), p=nextprime(p+1)); return(p)
vector(50, n, a(n)) \\ Derek Orr, Aug 04 2014
-
import sympy
for i in range(100):
a=(10**i)
p=sympy.nextprime(a)
while not sympy.isprime(p+4):
p=sympy.nextprime(p)
print(p)
A240170
Larger of the greatest cousin prime pair with n digits.
Original entry on oeis.org
7, 83, 971, 9887, 99881, 999983, 9999401, 99999551, 999999761, 9999999707, 99999999947, 999999998867, 9999999999083, 99999999999467, 999999999997841, 9999999999997031, 99999999999998717, 999999999999999161, 9999999999999996587, 99999999999999999803
Offset: 1
Analogous sequences with twin primes:
-
A092245 Lesser of the first twin prime pair with n digits.
-
A114429 Larger of the greatest twin prime pair with n digits.
-
a(n)=p=precprime(10^n);while(!isprime(p-4),p=precprime(p-1));return(p)
vector(50, n, a(n)) \\ Derek Orr, Aug 04 2014
-
import sympy
for i in range(1,100):
a=(10**i)
p=sympy.prevprime(a)
while sympy.isprime(p-4)==False:
p=sympy.prevprime(p)
print(p)
Showing 1-4 of 4 results.
Comments