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.

Showing 1-2 of 2 results.

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

A267430 Squares whose digit sum is not a prime.

Original entry on oeis.org

0, 1, 4, 9, 36, 64, 81, 100, 121, 144, 169, 196, 225, 324, 361, 400, 441, 484, 529, 576, 729, 900, 961, 1089, 1225, 1296, 1521, 1681, 1764, 1849, 2025, 2116, 2304, 2601, 2916, 3025, 3249, 3364, 3481, 3600, 3969, 4356, 4489, 4624, 4761, 5041, 5184, 5476, 5625
Offset: 1

Views

Author

Vincenzo Librandi, Jan 15 2016

Keywords

Comments

Complement of A065408.
Includes A016766. - Robert Israel, Jan 15 2016

Crossrefs

Programs

  • Magma
    [n^2: n in [0..80] | not IsPrime(&+Intseq(n^2))];
    
  • Maple
    remove(t->isprime(convert(convert(t,base,10),`+`)), [seq(i^2,i=0..100)]); # Robert Israel, Jan 15 2016
  • Mathematica
    Select[Range[0,100]^2, ! PrimeQ[Total[IntegerDigits[#]]] &]
  • PARI
    is(n) = issquare(n) && !ispseudoprime(sumdigits(n)); \\ Altug Alkan, Jan 15 2016

Extensions

a(1)=0 prepended by Altug Alkan Jan 15 2016
Edited by Bruno Berselli, Jan 15 2016
Showing 1-2 of 2 results.