login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A199169
Primes such that the sum of the squares of their digits equals the number of their digits.
1
11, 102001, 1000121, 1000211, 1002101, 1010201, 1020011, 1020101, 1021001, 1102001, 1120001, 1201001, 2001101, 2100011, 2110001, 100012111, 100101121, 100110121, 100112101, 100121011, 100211101, 101020111, 101100211, 101102101, 101110201, 101210101, 102100111
OFFSET
1,1
COMMENTS
A subsequence of 1, 11, 111, 1111, 2000, 10002, 10020, 10200, 11111,... which contains n such that A003132(n) = A055642(n). - R. J. Mathar, Nov 07 2011
LINKS
EXAMPLE
a(2) = 102001 is in the sequence because 1^2+0^2+2^2+0^2+0^2+1^2 = 6 = length(a(2)).
MAPLE
g:= proc(n, s) option remember; # <= n-digit numbers with sum of squares of digits = s
option remember; local j;
if s = 0 then return [0]
elif n = 0 then return []
fi;
[seq(op(map(t -> 10*t + j, procname(n-1, s-j^2))), j=0 .. min(9, floor(sqrt(s))))]
end proc:
sort([seq(op(select(t -> t >= 10^(n-1) and isprime(t), g(n, n))), n=1..9)]); # Robert Israel, Jan 09 2025
MATHEMATICA
fQ[n_] := Plus @@ (IntegerDigits[n]^2) == IntegerLength[n]; Select[Prime[Range[100000000]], fQ] (* Robert G. Wilson v, Nov 07 2011 *)
CROSSREFS
Cf. A069710.
Sequence in context: A165934 A110780 A087395 * A145571 A049193 A216596
KEYWORD
nonn,base,look,changed
AUTHOR
Michel Lagneau, Nov 03 2011
STATUS
approved