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-3 of 3 results.

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

A062099 Triangular numbers whose sum of digits is a triangular number.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 55, 78, 91, 105, 120, 136, 190, 210, 231, 253, 276, 300, 325, 406, 465, 528, 703, 780, 820, 861, 1081, 1176, 1225, 1275, 1540, 1596, 1653, 1711, 1770, 2080, 2211, 2346, 2701, 2775, 2850, 3003, 3160, 3403, 3486, 3570, 3741, 3828
Offset: 1

Views

Author

Amarnath Murthy, Jun 16 2001

Keywords

Examples

			a(8) = 28 is a triangular number and the sum of digits 10 is also a triangular number.
		

Crossrefs

Intersection of A187744 and A000217.

Programs

  • Magma
    [ t: n in [0..90] | IsSquare(8*s+1) where s is &+Intseq(t) where t is n*(n+1) div 2 ];  // Bruno Berselli, May 27 2011
  • Mathematica
    With[{trnos=Accumulate[Range[0,200]]},Select[trnos,MemberQ[trnos, Total[ IntegerDigits[ #]]]&]] (* Harvey P. Dale, Feb 26 2013 *)
  • PARI
    { for(m=0, 100, my(k=binomial(m+1,2)); if(ispolygonal(sumdigits(k),3), print1(k, ", "))) } \\ Harry J. Smith, Aug 01 2009
    

Extensions

More terms from Erich Friedman, Jun 20 2001

A118488 Squares for which the sum of the digits is a triangular number.

Original entry on oeis.org

0, 1, 64, 100, 361, 1225, 2116, 3025, 5041, 6400, 10000, 17956, 18496, 21025, 23104, 26569, 29584, 32041, 36100, 38809, 47089, 54289, 58564, 59536, 63001, 68644, 69696, 77284, 82369, 87616, 88804, 94249, 110224, 117649, 122500, 128881, 130321
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 05 2006

Keywords

Examples

			26569 = 163^2 is in the sequence because it is a square and the sum of its digits, 2+6+5+6+9 = 28, is a triangular number.
		

Crossrefs

Intersection of A000290 and A187744.
Cf. A000217.

Programs

  • Mathematica
    Select[Range[0, 361]^2, IntegerQ @ Sqrt[8 * Plus @@ IntegerDigits[#] + 1] &] (* Amiram Eldar, Mar 24 2021 *)
  • PARI
    isok(n) = issquare(n) && ispolygonal(sumdigits(n), 3); \\ Michel Marcus, Feb 27 2014
Showing 1-3 of 3 results.