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.

A282693 Numbers k such that k = (sum of digits of k)*((sum of digits of k) + 1).

Original entry on oeis.org

0, 12, 42, 90, 156
Offset: 1

Views

Author

Shmelev Aleksei, Feb 24 2017

Keywords

Examples

			    0 = 0*(0+1).
   12 = (1+2)*(1+2+1).
   42 = (4+2)*(4+2+1).
   90 = (9+0)*(9+0+1).
  156 = (1+5+6)*(1+5+6+1).
		

Programs

  • Mathematica
    fQ[n_] := Block[{a = Plus @@ IntegerDigits@ n}, a*(a +1) == n]; Select[ Range[0, 1000], fQ] (* Robert G. Wilson v, Feb 24 2017 *)
  • VBA
    Sub calcul()
       Sheets("Result").Select
       Range("A1").Select
       For i = 1 To 10000000
          Sum = 0
          For k = 1 To Len(i)
             Sum = Sum + Mid(i, k, 1)
          Next
          res = Sum * (Sum + 1)
          If res = i Then
             ActiveCell.Value = i
             ActiveCell.Offset(1, 0).Select
          End If
       Next
    End Sub