Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A086003
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A086003 Primes which when added to their own rotation yield a prime which when added to its own rotation also yields a prime. +0
3
271, 281, 10853, 10903, 10939, 12917, 12919, 16603, 16673, 16823, 16843, 18671, 18911, 18913, 20929, 22817, 22907, 24907, 26813, 26833, 26903, 26947, 28661, 28901, 28921, 30809, 30829, 32831, 32917, 32941, 34939, 36653, 36913, 38651 (list; graph; listen)
OFFSET

1,1

COMMENT

Rotation results in the suffix and prefix swapping positions around a central pivot. If the number of digits in n is odd, the center digit remains untouched during rotation. So for example the rotation of 1234 is 3412, while the rotation of 12345 is 45312. As a final step, n is added to its own rotation, so rotateAndAdd(12345) = 12345 + 45312 = 57657. This final number is tested for primality, and if it is prime, the process is performed again.

FORMULA

BEGIN rotateAndAdd(n) Let e = floor(LOG10(n))+1; Let h = floor(e/2); Let prefix = (n mod 10^h) * (10^(e-h)); Let middle = n - (floor(n/(10^(e-h)))*(10^(e-h))) - (n mod 10^h); Let suffix = floor(n / (10^(e-h))); Let rotated = prefix + middle + suffix; Return (n + rotated); END. If isPrime(n) And isPrime(rotateAndAdd(n)) And isPrime(rotateAndAdd(rotateAndAdd(n))) Then sequence.add(n)

EXAMPLE

a(6)=12917 because i. 12917 is prime. ii. rotate(12917) = 17912 and 12917+17912=30829 which is also prime. iii. rotate(30829) = 29830 and 30829+29830=60659 which is also prime.

CROSSREFS

Cf. A086002, A086004.

Sequence in context: A028535 A108094 A104844 this_sequence A048295 A020363 A051965

Adjacent sequences: A086000 A086001 A086002 this_sequence A086004 A086005 A086006

KEYWORD

base,nonn,uned

AUTHOR

Chuck Seggelin (barkeep(AT)plastereddragon.com), Jul 07 2003

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 July 26 23:19 EDT 2008. Contains 142293 sequences.


AT&T Labs Research