Beginning with n, add the next number, subtract the previous number and so on until one gets a prime, or 0 if no such prime is reached in 2n-1 steps: a(n) = n + (n+1) - (n-1) +(n+2) -(n-2) +(n+3)-(n-3)...+...is the first occurring prime at any step.
A092950
Beginning with n, add the next number, subtract the previous number and so on until one gets a prime, or 0 if no such prime is reached in 2n-1 steps: a(n) = n + (n+1) - (n-1) +(n+2) -(n-2) +(n+3)-(n-3)...+...is the first occurring prime at any step.
Terms
- a(0) =3a(1) =2a(2) =3a(3) =17a(4) =5a(5) =13a(6) =7a(7) =17a(8) =19a(9) =29a(10) =11a(11) =73a(12) =13a(13) =29a(14) =31a(15) =41a(16) =17a(17) =37a(18) =19a(19) =41a(20) =43a(21) =53a(22) =23a(23) =73a(24) =31a(25) =53a(26) =29a(27) =137a(28) =29a(29) =61
External references
- oeis: A092950