login
Write 2n=j+q (j,q positive noncomposite numbers); j*q maximal; then a(n)=j*q.
2

%I #27 Mar 16 2020 05:40:07

%S 1,4,9,15,25,35,49,55,77,91,121,143,169,187,221,247,289,323,361,391,

%T 437,403,529,551,589,667,713,703,841,899,961,943,1073,1147,1189,1271,

%U 1369,1363,1517,1591,1681,1763,1849,1927,2021,1891,2209,2279,2257,2491,2537,2623,2809,2867,2881

%N Write 2n=j+q (j,q positive noncomposite numbers); j*q maximal; then a(n)=j*q.

%C a(n) = A102084(n) for n > 0. [_Reinhard Zumkeller_, Aug 28 2011]

%e At n=6, 2n=12; 12 = 1 + 11 = 7 + 5; 7*5 = maximal => j*q = 7*5 = 35.

%p isA008578 := proc(n) if n = 1 then true ; elif isprime(n) then true; else false; end if; end proc:

%p 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:

%p seq(A193315(n),n=1..60) ; # _R. J. Mathar_, Aug 28 2011

%o (Sage)

%o def is_A008578(n): return n == 1 or is_prime(n)

%o def A193315(n): return max((j*(2*n-j)) for j in [1]+prime_range(n+1) if is_A008578(2*n-j))

%o [A193315(i) for i in range(1,15)]

%o # _D. S. McNeil_, Aug 27 2011

%o (Haskell)

%o a193315 1 = 1

%o a193315 n = maximum $ zipWith (*) prims $ map (a061397 . (2*n -)) prims

%o where prims = takeWhile (<= n) a008578_list

%o -- _Reinhard Zumkeller_, Aug 28 2011

%Y Cf. A073046, A008578, A061397.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Aug 26 2011