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*k-1. 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*k-1 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
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