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”).

Primes such that iterated sum-of-digits (A038194) is a square.
4

%I #19 Sep 05 2014 02:55:46

%S 13,19,31,37,67,73,103,109,127,139,157,163,181,193,199,211,229,271,

%T 283,307,337,373,379,397,409,433,463,487,499,523,541,571,577,607,613,

%U 631,643,661,733,739,751,757,769,787,811,823,829,859,877,883,919,937,967

%N Primes such that iterated sum-of-digits (A038194) is a square.

%C Primes which are 1 or 4 mod 9. - _Charles R Greathouse IV_, Sep 04 2014

%H Harvey P. Dale, <a href="/A079130/b079130.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) ~ 3n log n. - _Charles R Greathouse IV_, Sep 04 2014

%p select(isprime,map(t -> (9*t+1,9*t+4),[$1..1000])); # _Robert Israel_, Sep 04 2014

%t sQ[n_]:=MemberQ[{1,4,9},NestWhile[Total[IntegerDigits[#]]&,n,#>9&]]; Select[Prime[Range[300]],sQ] (* _Harvey P. Dale_, Dec 06 2012 *)

%o (PARI) forprime(p=2,1000,if(issquare(p%9),print1(p,",")))

%Y Cf. A078403, A079131, A079132.

%K nonn,easy,base

%O 1,1

%A _Klaus Brockhaus_, Dec 28 2002