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.

A223035 Prime numbers whose digits squared sum to a square.

Original entry on oeis.org

2, 3, 5, 7, 43, 263, 269, 1153, 1531, 1933, 2063, 2069, 2287, 2609, 3319, 3391, 3511, 3931, 4003, 4441, 4801, 4889, 5113, 5399, 5939, 6029, 6067, 6203, 6469, 6607, 8849, 9133, 9539, 10111, 10177, 10513, 10531, 10771, 11149, 11213, 11273, 11321, 11491, 11503
Offset: 1

Views

Author

Keywords

Examples

			269 is a prime number, and 2^2+6^2+9^2 = 121 = 11^2.
		

Crossrefs

Prime numbers from the sequence A175396.

Programs

  • Mathematica
    Select[Prime[Range[2000]], IntegerQ[Sqrt[Total[IntegerDigits[#]^2]]] &] (* T. D. Noe, Apr 05 2013 *)
  • R
    ssod<-function(i) sum(as.numeric(strsplit(as.character(i),"")[[1]])^2)
    issquare<-function(x) as.integer(sqrt(x))==sqrt(x)
    x=as.bigz(c()); i=2
    while(length(x)<10000) {if(issquare(ssod(i))) x=c(x,i); i=nextprime(i)}