Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A125523
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A125523 Democratic primes. Primes such that the left half of the prime is prime and the right half is not. +0
2
29, 31, 59, 71, 79, 211, 229, 239, 241, 251, 269, 271, 281, 311, 331, 349, 359, 379, 389, 509, 521, 541, 569, 571, 599, 701, 709, 719, 739, 751, 761, 769, 1109, 1151, 1163, 1181, 1187, 1193, 1301, 1321, 1327, 1381, 1399, 1709, 1721, 1733, 1777, 1787, 1901 (list; graph; listen)
OFFSET

2,1

COMMENT

If the length of n is odd then the central number is not used in the calculation. So neither the left half nor the right half will contain the central digit. If the length of n is even, then all numbers are used.

FORMULA

Half n is the floor of the length of n divided by 2.

EXAMPLE

The left half of 29 is 2 which is prime. The right half is 9 which is not prime.

The left half of 211 is 2 which is prime. The right half is 1 which is not prime.

PROGRAM

(PARI) \Political primes, democratic case. dem(n) = { local(x, ln, y, lp, rp); forprime(x=2, n, y=Str(x); if(x > 9, ln=floor(length(y)/2), ln=1); lp = eval(left(y, ln)); rp = eval(right(y, ln)); if(isprime(lp)&& !isprime(rp), print1(x", ") ) ) }

CROSSREFS

Sequence in context: A104071 A132240 A132243 this_sequence A156976 A157681 A077286

Adjacent sequences: A125520 A125521 A125522 this_sequence A125524 A125525 A125526

KEYWORD

base,easy,nonn

AUTHOR

Cino Hilliard (hillcino368(AT)hotmail.com), Jan 22 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research