cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A165459 Primes p such that the sum of the digits of p^2 is 16.

This page as a plain text file.
%I A165459 #10 Sep 08 2022 08:45:47
%S A165459 13,23,31,41,59,103,131,139,211,229,239,347,401,491,499,571,751,1021,
%T A165459 1201,1229,1453,1489,1499,1741,2003,2011,3001,3821,4001,4639,4649,
%U A165459 5701,7079,8951,10111,10247,10301,10499,14251,14639,16249,17321,19751,20011
%N A165459 Primes p such that the sum of the digits of p^2 is 16.
%H A165459 Vincenzo Librandi, <a href="/A165459/b165459.txt">Table of n, a(n) for n = 1..80</a>
%F A165459 {A000040(i) : A123157(i) = 16}. [_R. J. Mathar_, Nov 09 2009]
%e A165459 31 is in the sequence because 31^2=961 and 9+6+1=16;
%e A165459 1489 is in the sequence because 1489^2=2217121 and 2+2+1+7+1+2+1=16;
%e A165459 3001 is in the sequence because 3001^2=9006001 and 9+0+0+6+0+0+1=16.
%p A165459 A007953 := proc(n) local d ; add(d, d=convert(n,base,10)) ; end proc: A165459 := proc(n) local a ; if n = 1 then 13; else a := nextprime( procname(n-1)) ; while A007953(a^2) <> 16 do a := nextprime(a) ; end do ; return a ; end if; end proc: seq(A165459(n),n=1..50) ; # _R. J. Mathar_, Nov 09 2009
%t A165459 Select[Prime[Range[3000]], Total[IntegerDigits[#^2]]==16 &] (* _Vincenzo Librandi_, Jun 24 2013 *)
%o A165459 (Magma) [p: p in PrimesUpTo(3*10^4) | &+Intseq(p^2) eq 16]; // _Bruno Berselli_, Jun 24 2013
%K A165459 nonn,less,base
%O A165459 1,1
%A A165459 _Vincenzo Librandi_, Sep 20 2009
%E A165459 Edited by _N. J. A. Sloane_, Sep 25 2009
%E A165459 347 inserted, more terms added by _R. J. Mathar_, Nov 09 2009