login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088786 Numbers n which are prime and which when each digit is incremented by 2 with carries ignored yields another prime p with the same property. 3
3, 19, 37, 61, 83, 97, 137, 227, 257, 419, 449, 607, 661, 797, 881, 883, 919, 977, 1009, 1249, 1307, 1669, 2239, 2797, 3257, 3319, 3389, 3529, 3769, 3877, 4919, 5099, 5417, 5477, 5657, 6317, 6619, 6899, 6949, 7489, 7517, 7699, 7789, 7879, 8209, 8219, 8297 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

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(8)=227 because (i) 227 is a prime and (ii) incrementing each digit of 227 by 2 yields 449 which is a prime and (iii) incrementing each digit of 449 by 2 (ignoring carries) yields 661 which is a prime

PROG

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); if isprime(j) and isprime(cycle222(j)) then sequence.add(p) else p=nextPrimeAfter(p); loop; next i;

CROSSREFS

Cf. A088785, A088787, A088788.

Sequence in context: A178201 A062291 A106082 * A147237 A117674 A114704

Adjacent sequences:  A088783 A088784 A088785 * A088787 A088788 A088789

KEYWORD

base,nonn

AUTHOR

Chuck Seggelin (barkeep(AT)plastereddragon.com), Oct 16 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 14:07 EST 2012. Contains 205930 sequences.