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, 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
Offset: 1
Examples
283 is in the sequence because 2^2+8^2+3^2 + 2^2*8^2*3^2 = 77 + 2304 = 2381 is prime.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A185300.
Programs
-
Magma
dd:=func
; [n: n in [1..520] | IsPrime(&+dd(n)+&*dd(n))]; // Bruno Berselli, Aug 02 2012 -
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:
-
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