login
A068896
Primes containing 2k digits in which the sum of the first k digits is that of the last k digits.
3
11, 1423, 1607, 1753, 1973, 2011, 2213, 2341, 2543, 2617, 2671, 2819, 2837, 3407, 3461, 3517, 3571, 3719, 3847, 4013, 4637, 4673, 4691, 4729, 4783, 4967, 5023, 5261, 5519, 5573, 5591, 5647, 5683, 5849, 5867, 6143, 6217, 6271, 6473, 6491, 6529, 6547, 7043, 7649, 7759, 8017, 8053, 8219, 8237, 8273, 8291, 8329, 8677, 9137, 9173, 9283, 9467
OFFSET
1,1
LINKS
EXAMPLE
2341 is a member with 2+3 = 4+1.
MATHEMATICA
Select[Prime[Range[169, 1229]], Length[Union[Total/@TakeDrop[ IntegerDigits[ #], 2]]] == 1&] (* The program generates all 56 4-digit terms. To generate all 3669 of the 6-digit terms, change the Range constants to (9593, 78498) and change the 2 to 3. *) (* Harvey P. Dale, Aug 15 2021 *)
PROG
(Python)
from sympy import primerange
def sd(s): return sum(map(int, s))
def auptod(digits):
alst = []
for d in range(2, digits+1, 2):
for p in primerange(10**(d-1), 10**d):
s = str(p)
if sd(s[:len(s)//2]) == sd(s[len(s)//2:]): alst.append(p)
return alst
print(auptod(4)) # Michael S. Branicky, Aug 15 2021
CROSSREFS
Cf. A240927.
Sequence in context: A110195 A015484 A145185 * A286650 A015027 A160264
KEYWORD
easy,nonn,base
AUTHOR
Amarnath Murthy, Mar 21 2002
EXTENSIONS
Corrected and extended by Harvey P. Dale, Aug 15 2021
11 prepended by David A. Corneth, Aug 15 2021
STATUS
approved