login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A253252 Twin primes with equal number of odd and even digits. 1
29, 41, 43, 61, 1021, 1049, 1061, 1063, 1229, 1289, 1427, 1429, 1481, 1483, 1487, 1489, 1607, 1609, 1621, 1667, 1669, 2129, 2141, 2143, 2237, 2239, 2309, 2341, 2381, 2383, 2549, 2657 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Note that there are the lesser of twin primes (A001359) such as 29, 1049, 1229, 1289, 2129, 2309, 2549, 2729, 2789, 2969, 4019, 4259, 5009,...; the greater of twin primes (A006512) such as 61, 1021, 1621, 2341, 3001, 4051, 4231, 4651, 5281,....; and both terms of twin prime pairs (A001097) such as {41,43}, {1061,1063}, {1427,1429}, {1481,1483}, {1487,1489}, {1607,1609}, {1667,1669}, {2141,2143}, {2237,2239}, {2381,2383}, {2657,2659}, {3461,3463}, {3467,3469}, {3821,3823}, {4091,4093}, {4127,4129}, {4217,4219}, {4271,4273}, {4547,4549}, {4637,4639}, {4721,4723}, {4787,4789}, {4967,4969}, {5021,5023}, ....

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

MAPLE

Primes:= select(isprime, {seq(2*i+1, i=1..5000)}):

Twins:= map(t -> (t, t+2), Primes intersect map(`-`, Primes, 2)):

filter:= proc(n) local L, Lo, Le;

   if ilog10(n)::even then return false fi;

   L:= convert(n, base, 10);

   Lo, Le:= selectremove(type, L, odd);

   nops(Lo)=nops(Le)

end proc:

sort(convert(select(filter, Twins), list)); # Robert Israel, Jun 08 2015

MATHEMATICA

Select[Prime@ Range@ 500, Plus @@ BitAnd[ IntegerDigits@#, 1] == IntegerLength[#]/2 && Or @@ PrimeQ[# + {2, -2}] &] (* Giovanni Resta, Jun 08 2015 *)

PROG

(PARI) is(n)=my(d=digits(n)); #d%2==0 && sum(i=1, #d, d[i]%2)==#d/2 && isprime(n) && (isprime(n+2)||isprime(n-2)) \\ Charles R Greathouse IV, Jun 08 2015

CROSSREFS

Subsequence of A144226.

Cf. A001097, A001359, A006512.

Sequence in context: A108325 A242555 A101007 * A155575 A229059 A330653

Adjacent sequences:  A253249 A253250 A253251 * A253253 A253254 A253255

KEYWORD

base,nonn

AUTHOR

Zak Seidov, Jun 07 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 06:52 EDT 2021. Contains 344943 sequences. (Running on oeis4.)