OFFSET
1,2
COMMENTS
a(n) = A102084(n) for n > 0. [Reinhard Zumkeller, Aug 28 2011]
EXAMPLE
At n=6, 2n=12; 12 = 1 + 11 = 7 + 5; 7*5 = maximal => j*q = 7*5 = 35.
MAPLE
isA008578 := proc(n) if n = 1 then true ; elif isprime(n) then true; else false; end if; end proc:
A193315 := proc(n) local mx, j, q ; mx := 0 ; for j from 1 to 2*n-1 do if isA008578(j) then q := 2*n-j ; if isA008578(q) then mx := max(mx, j*q) ; end if ; end if; end do: mx ; end proc:
seq(A193315(n), n=1..60) ; # R. J. Mathar, Aug 28 2011
PROG
(Sage)
def is_A008578(n): return n == 1 or is_prime(n)
[A193315(i) for i in range(1, 15)]
# D. S. McNeil, Aug 27 2011
(Haskell)
a193315 1 = 1
a193315 n = maximum $ zipWith (*) prims $ map (a061397 . (2*n -)) prims
where prims = takeWhile (<= n) a008578_list
-- Reinhard Zumkeller, Aug 28 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 26 2011
STATUS
approved