

A107288


Primes whose digit sum is a square.


8



13, 31, 79, 97, 103, 211, 277, 349, 367, 439, 457, 547, 619, 673, 691, 709, 727, 853, 907, 997, 1021, 1069, 1087, 1201, 1249, 1429, 1447, 1483, 1609, 1627, 1663, 1699, 1753, 1789, 1861, 1879, 1933, 1951, 1987, 2011, 2239, 2293, 2347, 2383, 2437, 2473, 2617, 2671
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Primes in A028839. [K. D. Bajpai, Jul 08 2014]
From Altug Alkan and Waldemar Puszkarz, Apr 10 2016: All terms are congruent to 1 mod 6. Proof: For n > 2, prime(n) is 1 or 5 mod 6. If p is 5 mod 6, then it is of the form 3*k1. For numbers of this form, the sum of digits is also of this form, as can be seen through the kind of reasoning used in proving that numbers divisible by 3 have the sum of digits divisible by 3. However, 3*k1 can never be a square, meaning n^2+1 is never divisible by 3: any n is equal to one of 0, 1, 2 mod 3, thus by the rules of modular arithmetic, n^2+1 is 1 or 2 mod 3, never 0. Hence p must be congruent to 1 mod 6.


LINKS

K. D. Bajpai, Table of n, a(n) for n = 1..10000


EXAMPLE

79 is in the sequence because it is prime. Also, (7 + 9) = 16 = 4^2.
997 is in the sequence because it is prime. Also, (9 + 9 + 7) = 25 = 5^2.


MAPLE

with(numtheory): A107288:= proc() local a; a:=add(i, i = convert((n), base, 10))(n); if isprime(n) and root(a, 2)=floor(root(a, 2)) then RETURN (n); fi; end: seq(A107288 (), n=1..5000); # K. D. Bajpai, Jul 08 2014


MATHEMATICA

bb = {}; Do[If[IntegerQ[Sqrt[Apply[Plus, IntegerDigits[p = Prime[n]]]]], bb = Append[bb, p]], {n, 500}]; bb


PROG

(PARI) lista(nn) = {forprime(p=2, nn, if (issquare(sumdigits(p)), print1(p, ", ")); ); } \\ Michel Marcus, Apr 09 2016


CROSSREFS

Cf. A000040, A007953, A028839, A048519.
Cf. A244863 (Semiprimes whose digit sum is square).
Sequence in context: A217614 A158723 A211116 * A095379 A160772 A271575
Adjacent sequences: A107285 A107286 A107287 * A107289 A107290 A107291


KEYWORD

nonn,base


AUTHOR

Zak Seidov, May 20 2005


EXTENSIONS

Terms a(47) and a(48) added by K. D. Bajpai, Jul 08 2014


STATUS

approved



