login
a(n) = largest prime that is the concatenation of two numbers whose sum is n.
3

%I #26 Sep 03 2024 12:13:50

%S 11,0,31,41,0,61,71,0,73,101,0,211,311,0,313,107,0,811,911,0,211,1013,

%T 0,1213,1511,0,1117,1811,0,2011,2111,0,2311,2411,0,2017,2711,0,2713,

%U 3011,0,2617,431,0,3511,3413,0,3613,3911,0,4111,4211,0,541,3917,0,4513,4217

%N a(n) = largest prime that is the concatenation of two numbers whose sum is n.

%C a(3k) = 0. Conjecture: No other term is zero.

%C Conjecture is false: first counterexample is 4477. See A375938. - _Robert Israel_, Sep 03 2024

%H Robert Israel, <a href="/A087555/b087555.txt">Table of n, a(n) for n = 2..10000</a>

%e a(10) = 73, the partitions of 10 are (1,9), (2,8), (3,7), (4,6), (5,5) and the primes obtained are 19,37 and 73.

%p f:= proc(n) local L,a,x;

%p if n mod 3 = 0 then return 0 fi;

%p L:= sort([seq(tcat(n-a,a),a=1..n-1,2)],`>`);

%p for x in L do if isprime(x) then return x fi od;

%p 0

%p end proc:

%p map(f, [$2..100]); # _Robert Israel_, Sep 03 2024

%t lpc[n_]:=Max[Select[FromDigits[Flatten[IntegerDigits[#]]]&/@(Flatten[{#,Reverse[#]}&/@ IntegerPartitions[ n,{2}],1]),PrimeQ]]; Array[lpc,60,2]/.(-\[Infinity])->0 (* _Harvey P. Dale_, Aug 02 2024 *)

%Y Cf. A087556, A375938.

%K base,nonn,look

%O 2,1

%A _Amarnath Murthy_, Sep 13 2003

%E More terms from _David Wasserman_, Jun 07 2005