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.

A107289 Numbers k such that the sum of digits of k^2 is a prime.

Original entry on oeis.org

4, 5, 7, 16, 17, 25, 26, 28, 29, 32, 34, 37, 38, 40, 44, 47, 49, 50, 52, 53, 56, 61, 62, 64, 65, 70, 73, 79, 82, 83, 89, 91, 98, 106, 107, 109, 115, 116, 118, 119, 125, 127, 133, 137, 142, 143, 146, 149, 151, 154, 155, 160, 161, 164, 170, 173, 181, 182, 187, 188, 199
Offset: 1

Views

Author

Zak Seidov, May 20 2005

Keywords

Crossrefs

Cf. A065408.

Programs

  • Mathematica
    bb={};Do[If[PrimeQ[Apply[Plus, IntegerDigits[n^2]]], bb=Append[bb, n]], {n, 500}];bb
  • PARI
    isok(n) = isprime(sumdigits(n^2)); \\ Michel Marcus, Jan 09 2019

Formula

a(n) = sqrt(A065408(n)).