login
A306701
Numbers k such that the sum of the digits and the sum of the square of the digits of k are prime factors of k.
1
110, 111, 120, 133, 210, 803, 1010, 1011, 1020, 1100, 1101, 1110, 1200, 1330, 2010, 2023, 2100, 8030, 10010, 10011, 10020, 10100, 10101, 10110, 10200, 11000, 11001, 11010, 11100, 12000, 12110, 13300, 20010, 20100, 20230, 21000, 80300, 100010, 100011, 100020
OFFSET
1,1
COMMENTS
Subsequence of A062713.
The corresponding pairs of primes factors are (2, 2), (3, 3), (3, 5), (7, 19), (3, 5), (11, 73), (2, 2), (3, 3), (3, 5), (2, 2), (3, 3), (3, 3), (3, 5), (7, 19), (3, 5), (7, 17), (3, 5), (11, 73), (2, 2), ... with many repetitions of some pairs.
{a(n)} = E1 union E2 where E1 = {110, 111, 120, 133, 210, ...} is the subsequence of primitive values, and E2 = {1100, 1110, 1200, ...} is the subsequence of the non-primitive values. The subsequence E1 = F1 union F2 where F1 is the finite subsequence having distinct decimal digits. F1 starts with 120, 210, 803, 615784, 1742386, 2341678, 3059824, 3075914, 5910374, 6157840, 6285901, 8234716, 8734126, 8951024, 9150428, 12946078, ... with the corresponding pairs of prime factors (3, 5), (3, 5), (11, 73), (31, 191), (31, 179), (31, 179), (31, 199), (29, 181), (29, 181), (31, 191), (31, 211), (31, 179), (31, 179), (29, 191), (29, 191), (37, 251), ...
We observe repetitions of some pairs : (3, 5), (31, 191), (31, 179), (29, 181), (29, 171), ...
F2, the set of numbers having at least two identical digits, is infinite because it contains all the numbers of the form 10^k + 10^j + 1 with k > j > 0. - Giovanni Resta, May 08 2019
If k is in the sequence then so is 10*k. - David A. Corneth, May 08 2019
LINKS
EXAMPLE
120 is an element because 1 + 2 + 0 = 3 and 1^2 + 2^2 + 0^2 = 5 are prime factors of 120;
615784 is an element because 6 + 1 + 5 + 7 + 8 + 4 = 31 and 6^2 + 1^2 + 5^2 + 7^2 + 8^2 + 4^2 = 191 are prime factors of 615784 = 2^3 * 13 * 31 * 191.
MAPLE
with(numtheory):nn:=20000:
for n from 1 to nn do:
x:=convert(n, base, 10):n0:=nops(x):
s1:=sum(‘x[i]’, ‘i’=1..n0):s2:=sum(‘x[i]^2’, ‘i’=1..n0):
if isprime(s1) and isprime(s2) and irem(n, s1)=0 and irem(n, s2)=0
then
printf(`%d, `, n):
else
fi:
od:
MATHEMATICA
sd2Q[n_]:=Module[{idn=Total[IntegerDigits[n]], idn2=Total[ IntegerDigits[ n]^2], f= FactorInteger[ n][[All, 1]]}, AllTrue[{idn, idn2}, PrimeQ] && MemberQ[ f, idn]&&MemberQ[f, idn2]]; Select[Range[101000], sd2Q] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 15 2020 *)
PROG
(MATLAB) m=1;
for u=1:200000
digit=dec2base(u, 10)-'0'; digit1=digit.^2; s1=sum(digit); s2=sum(digit1);
if and(isprime(s1)==1, isprime(s2)==1)
if and(mod(u, s1)==0, mod(u, s2)==0)
sol(m)=u;
m=m+1;
end
end
end
sol % Marius A. Burtea, May 08 2019
(PARI) isok(n) = my(d=digits(n), sd = vecsum(d), sd2 = sum(k=1, #d, d[k]^2)); isprime(sd) && isprime(sd2) && !(n%sd) && !(n%sd2); \\ Michel Marcus, May 11 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 08 2019
STATUS
approved