login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

All terms are odd squares. - Robert Israel, Apr 03 2017

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

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

Cf. A000203, A284643.

Sequence in context: A110906 A193940 A012115 * A264877 A173246 A017765

Adjacent sequences:  A284639 A284640 A284641 * A284643 A284644 A284645

KEYWORD

nonn,base

AUTHOR

Paolo P. Lava, Mar 31 2017

EXTENSIONS

a(20)-a(31) from Giovanni Resta, Mar 31 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 21 14:23 EST 2018. Contains 299414 sequences. (Running on oeis4.)