login
A284642
Numbers k such that concat(k, sigma(k)) and concat(sigma(k), k) are both prime.
1
1, 49, 961, 1089, 25281, 52441, 73441, 76729, 361201, 375769, 499849, 1315609, 1968409, 2961841, 3470769, 4289041, 4669921, 4748041, 5536609, 7392961, 7912969, 9296401, 9628609, 10556001, 13039321, 13830961, 14737921, 14753281, 17330569, 17380561, 18088009
OFFSET
1,2
COMMENTS
All terms are odd squares. - Robert Israel, Apr 03 2017
LINKS
EXAMPLE
sigma(49) = 57 and 5749 and 4957 are both prime.
MAPLE
with(numtheory): P:=proc(q) local a, b, n; for n from 1 by 2 to q do
a:=n*10^(ilog10(sigma(n))+1)+sigma(n); b:=sigma(n)*10^(ilog10(n)+1)+n;
if isprime(a) and isprime(b) then print(n); fi; od; end: P(10^9);
# Alternative:
filter:= proc(n) local s;
s:= numtheory:-sigma(n);
isprime(n*10^(1+ilog10(s))+s) and isprime(s*10^(1+ilog10(n))+n)
end proc:
select(filter, [seq(i^2, i=1..10000, 2)]); # Robert Israel, Apr 03 2017
MATHEMATICA
cnc[x_, y_] := FromDigits@ Flatten@ IntegerDigits[{x, y}]; Select[ Range[10^5], (d = DivisorSigma[1, #]; PrimeQ@ cnc[d, #] && PrimeQ@ cnc[#, d]) &] (* Giovanni Resta, Mar 31 2017 *)
PROG
(PARI)is(k)={my(v1=digits(k), v2=digits(sigma(k))); isprime(fromdigits(concat(v1, v2)))&&isprime(fromdigits(concat(v2, v1)))};
findFirstTerms(q)={my(ans:list, k=1); ans=List(); q=max(1, q); for(c=1, q, while(!is(k), k++); listput(ans, k); k++); Vec(ans)} \\ R. J. Cano, Mar 31 2017
CROSSREFS
Sequence in context: A110906 A193940 A012115 * A304046 A264877 A173246
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Mar 31 2017
EXTENSIONS
a(20)-a(31) from Giovanni Resta, Mar 31 2017
STATUS
approved