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!)
A088785 Numbers n which are prime and which when each digit is incremented by 2 with carries ignored yield another prime. 3
3, 5, 19, 29, 31, 37, 59, 61, 67, 83, 97, 127, 131, 137, 151, 157, 167, 191, 199, 211, 227, 241, 257, 277, 347, 359, 419, 421, 431, 449, 461, 479, 491, 521, 547, 587, 601, 607, 617, 631, 641, 661, 761, 797, 821, 829, 857, 859, 881, 883, 919, 941, 971, 977, 991 (list; graph; refs; listen; history; text; 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. 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.

LINKS

Table of n, a(n) for n=1..55.

EXAMPLE

a(7)=59 because 5+2=7 and 9+2=1 (ignoring carry) and 71 is 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; if isprime(cycle222(p)) then sequence.add(p) else p=nextPrimeAfter(p); loop; next i;

CROSSREFS

Cf. A088786, A088787, A088788.

Sequence in context: A095826 A058778 A211439 * A277688 A215131 A068990

Adjacent sequences:  A088782 A088783 A088784 * A088786 A088787 A088788

KEYWORD

base,nonn

AUTHOR

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

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 May 28 15:55 EDT 2020. Contains 334684 sequences. (Running on oeis4.)