login
A392563
a(n) is the least number that can be written in exactly n ways as p + r, where p is a prime and r is an anagram of p.
3
1, 4, 44, 88, 299, 898, 776, 1106, 5008, 4994, 6325, 5654, 5104, 6776, 8888, 8998, 9494, 8585, 10706, 43444, 11009, 12625, 26666, 44554, 50504, 31211, 53332, 66556, 54443, 54344, 39998, 11110, 28888, 67777, 55556, 32221, 33332, 91108, 55564, 89908, 108088, 106706, 107062, 89888, 71110, 66662
OFFSET
0,2
COMMENTS
Leading zeros are not allowed.
LINKS
FORMULA
A393958(a(n)) = n.
EXAMPLE
a(5) = 898 because 898 = 179 + 719 = 269 + 629 = 359 + 539 = 449 + 449 = 719 + 179 can be written in exactly 5 ways as the sum of a prime and an anagram of that prime, and 898 is the least number that works.
MAPLE
g:= proc(n) local d, F, i;
F:= convert(n, base, 10); d:= nops(F);
map(t -> n + add(t[i]*10^(i-1), i=1..d), select( t -> t[-1] <> 0, combinat:-permute(F)))
end proc:
N:= 1000000: V:= Vector(N):
for p in select(isprime, [2, seq(i, i=3..N, 2)]) do
v:= select(`<=`, g(p), N);
V[v]:= V[v]+~ 1
od:
R:= Array(0..max(V)):
for i from 1 to N do
if R[V[i]] = 0 then R[V[i]]:= i fi
od:
if not member(0, R, 'k0') then k0:= max(V)+1 fi;
convert(R[0..k0-1], list);
CROSSREFS
Cf. A393958.
Sequence in context: A284065 A063837 A389757 * A344871 A071125 A193448
KEYWORD
nonn,base,look
AUTHOR
Robert Israel, Mar 04 2026
STATUS
approved