|
|
A214746
|
|
Numbers n such that (sum of the square of the decimal digits of n) + (product of the square of decimal digits of n) is prime.
|
|
1
|
|
|
1, 11, 13, 16, 19, 29, 31, 37, 59, 61, 73, 79, 91, 92, 95, 97, 101, 102, 104, 106, 110, 120, 140, 160, 201, 203, 205, 207, 210, 225, 230, 238, 250, 252, 270, 283, 302, 308, 320, 328, 380, 382, 401, 405, 409, 410, 449, 450, 490, 494, 502, 504, 506, 508, 520
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
283 is in the sequence because 2^2+8^2+3^2 + 2^2*8^2*3^2 = 77 + 2304 = 2381 is prime.
|
|
MAPLE
|
A:= proc(n) add(d^2, d=convert(n, base, 10)) ; end proc:
B:= proc(n) mul(d^2, d=convert(n, base, 10)) ; end proc:
isA:= proc(n) isprime(A(n)+B(n)) ; end proc:
for n from 1 to 1000 do if isA(n) then printf("%a, ", n) ; end if; end do:
|
|
PROG
|
(PARI) is(n)=my(v=eval(Vec(Str(n)))); isprime(sum(i=1, #v, v[i]^2)+prod(i=1, #v, v[i]^2)) \\ Charles R Greathouse IV, Aug 02 2012
(Magma) dd:=func<n | [d^2: d in Intseq(n)]>; [n: n in [1..520] | IsPrime(&+dd(n)+&*dd(n))]; // Bruno Berselli, Aug 02 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|