|
Search: id:A092951
|
|
|
| A092951 |
|
Beginning with n add the next number, subtract the previous number and so on then a(n) = the largest prime arising in this process, or 0 if no prime is reached in 2n-1 steps: a(n) is the largest occurring prime in the sum n + (n+1) - (n-1) +(n+2) -(n-2) +(n+3)-(n-3)...+... + or - 1 occurring at any stage. |
|
+0 2
|
|
| 3, 5, 7, 17, 19, 37, 37, 41, 67, 101, 103, 73, 107, 197, 199, 257, 257, 157, 263, 401, 401, 269, 487, 577, 577, 677, 677, 281, 787, 421, 787, 593, 907, 797, 1091, 1297, 1297, 1301, 1447, 1601, 1601, 1453, 1607, 1609, 1459
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
Conjecture: No term is zero.
|
|
EXAMPLE
|
a(5) = 19 and the steps are 5, 5+6, 5+6-4, 5+6-4+7, 5+6-4+7-3, 5+6-4+7-3+8, 5+6-4+7-3+8-2+9,5+6-4+7-3+8-2+9-1 and the numbers arising are 5,11,7,14,11,19,17,26,25. 19 is the largest prime.
|
|
PROGRAM
|
(GAP) A := function ( n ) local m, p, l, u; p := 0; u := n + 1; l := n - 1; m := n; if IsPrime( m ) then p := m; fi; repeat m := m + u; if IsPrime( m ) then p := m; fi; u := u + 1; m := m - l; if m > p and IsPrime( m ) then p := m; fi; l := l - 1; until l = 0; return p; end; (from Simon Nickerson (simonn(AT)maths.bham.ac.uk, Jun 29 2005)
|
|
CROSSREFS
|
Cf. A092950.
Sequence in context: A122395 A045401 A085499 this_sequence A001259 A087126 A062547
Adjacent sequences: A092948 A092949 A092950 this_sequence A092952 A092953 A092954
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Mar 24 2004
|
|
EXTENSIONS
|
More terms from Simon Nickerson (simonn(AT)maths.bham.ac.uk, Jun 29 2005)
|
|
|
Search completed in 0.002 seconds
|