cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A068896 Primes containing 2k digits in which the sum of the first k digits is that of the last k digits.

This page as a plain text file.
%I A068896 #19 Aug 26 2021 17:00:13
%S A068896 11,1423,1607,1753,1973,2011,2213,2341,2543,2617,2671,2819,2837,3407,
%T A068896 3461,3517,3571,3719,3847,4013,4637,4673,4691,4729,4783,4967,5023,
%U A068896 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
%N A068896 Primes containing 2k digits in which the sum of the first k digits is that of the last k digits.
%H A068896 David A. Corneth, <a href="/A068896/b068896.txt">Table of n, a(n) for n = 1..10000</a>
%e A068896 2341 is a member with 2+3 = 4+1.
%t A068896 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 *)
%o A068896 (Python)
%o A068896 from sympy import primerange
%o A068896 def sd(s): return sum(map(int, s))
%o A068896 def auptod(digits):
%o A068896     alst = []
%o A068896     for d in range(2, digits+1, 2):
%o A068896         for p in primerange(10**(d-1), 10**d):
%o A068896             s = str(p)
%o A068896             if sd(s[:len(s)//2]) == sd(s[len(s)//2:]): alst.append(p)
%o A068896     return alst
%o A068896 print(auptod(4)) # _Michael S. Branicky_, Aug 15 2021
%Y A068896 Cf. A240927.
%K A068896 easy,nonn,base
%O A068896 1,1
%A A068896 _Amarnath Murthy_, Mar 21 2002
%E A068896 Corrected and extended by _Harvey P. Dale_, Aug 15 2021
%E A068896 11 prepended by _David A. Corneth_, Aug 15 2021