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.

A117674 Prime numbers whose sum of digits is a triangular number.

Original entry on oeis.org

3, 19, 37, 73, 109, 127, 163, 181, 271, 307, 433, 523, 541, 613, 631, 811, 1009, 1063, 1117, 1153, 1171, 1423, 1531, 1621, 1801, 1999, 2017, 2053, 2143, 2161, 2251, 2341, 2503, 2521, 3061, 3313, 3331, 3511, 3889, 4051, 4231, 4789, 4969, 4987, 5023, 5113
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 27 2006

Keywords

Examples

			1999 is in the sequence because it is a prime number and the sum of its digits 1+9+9+9 = 28 is a triangular number.
		

Crossrefs

Intersection of A000040 and A187744.

Programs

  • Mathematica
    t={};Do[m = Total[IntegerDigits[Prime[n]]];If[IntegerQ[(Sqrt[8*m + 1]-1)/2],AppendTo[t, Prime[n]]],{n,700}];t  (* Jayanta Basu, Apr 27 2013 *)
  • PARI
    isok(p) = isprime(p) && ispolygonal(sumdigits(p), 3); \\ Michel Marcus, Feb 08 2021