|
Search: id:A092950
|
|
|
| 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. |
|
+0 2
|
|
| 3, 2, 3, 17, 5, 13, 7, 17, 19, 29, 11, 73, 13, 29, 31, 41, 17, 37, 19, 41, 43, 53, 23, 73, 31, 53, 29, 137, 29, 61, 31, 73, 67, 149, 71, 73, 37, 101, 79, 89, 41, 109, 43, 89, 47, 101, 47, 97, 107, 101, 103, 113, 53, 109, 61, 113, 59, 197, 59, 241, 61, 149, 127, 137, 131, 157
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
a(p) = p, p is a prime. If the process is continued until a 1 is subtracted the result is n^2. Conjecture: No term is zero.
|
|
FORMULA
|
The k-th step of the process used to generate the n-th term is 2n+(k^2)/4 if k is even, and n+(k^2-1)/4 if k is odd. - Adam M. Kalman (mocha(AT)clarityconnect.com), Nov 09 2004
|
|
EXAMPLE
|
a(4) = 17, and the steps are 4, 4+5, 4+5-3, 4+5-3+6, 4+5-3+6-2, 4+5-3+6-2+7= 17. a(6) = 6+7 =13.
|
|
MATHEMATICA
|
For[a=1, a<100, x:=a; s:=1; While[(!PrimeQ[x])\[And](s<=2a-1), If[OddQ[s], x+=a+(s+1)/2, x+=-a+s/2]; s++ ]; If[PrimeQ[x], Print[x], Print[0]]; a++ ]; (Kalman)
|
|
CROSSREFS
|
Cf. A092951, A092952.
Sequence in context: A057053 A081850 A059366 this_sequence A059239 A123170 A091806
Adjacent sequences: A092947 A092948 A092949 this_sequence A092951 A092952 A092953
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Mar 24 2004
|
|
EXTENSIONS
|
More terms from Adam M. Kalman (mocha(AT)clarityconnect.com), Nov 09 2004
|
|
|
Search completed in 0.002 seconds
|