Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A088787
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A088787 Numbers which are primes and which remain prime for three successive applications of incrementing each digit by 2 with carries ignored. +0
4
61, 97, 227, 449, 661, 797, 881, 1307, 2797, 3877, 5477, 5657, 8297, 8669, 8849, 8861, 9887, 11257, 12517, 15287, 16487, 17387, 19427, 20287, 20897, 23197, 23957, 25717, 26227, 30637, 36947, 39217, 41687, 41927, 42197, 42797, 45127, 45827, 51637 (list; graph; listen)
OFFSET

1,1

COMMENT

Imagine that each digit of n is on a wheel on a combination lock, and each wheel is being rotated two notches for each application of the function. Thus for the digits 0 to 7, the replacement digit is simply the digit+2, but for 8 the replacement digit is 0 and for 9 the replacement digit is 1. Thus 227 -> 449 -> 661 -> 883 -> 5 (initial zeros are dropped on results.)

EXAMPLE

a(3)=227 because (i) 227 is prime and (ii) incrementing each digit of 227 by 2 yields 449 which is prime and (iii) incrementing each digit of 449 by 2 (ignoring carries) yields 661 which is prime and (iv) incrementing each digit of 661 by 2 yields 883 which is prime

PROGRAM

Function Cycle222(long: p): long {i: integer; r: long; c: integer; for i=floor(log10(p)) to 0 step -1; c = floor(p/10^(i-1)) mod 10; r = r*10 + ((c+2) mod 10); next i; return r; } p=2; for i=1 to 90; n=sequence.count; do while sequence.count=n; j=cycle222(p); k=cycle222(j); if isprime(j) and isprime(k) and isprime(cycle222(k)) then sequence.add(p) else p=nextPrimeAfter(p); loop; next i;

CROSSREFS

Cf. A088785, A088786, A088788.

Sequence in context: A038856 A045562 A104229 this_sequence A020350 A142108 A033239

Adjacent sequences: A088784 A088785 A088786 this_sequence A088788 A088789 A088790

KEYWORD

base,nonn

AUTHOR

Chuck Seggelin (barkeep(AT)plastereddragon.com), Oct 16 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 August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research