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

This page as a plain text file.
%I A282693 #37 Jul 24 2021 01:12:01
%S A282693 0,12,42,90,156
%N A282693 Numbers k such that k = (sum of digits of k)*((sum of digits of k) + 1).
%e A282693     0 = 0*(0+1).
%e A282693    12 = (1+2)*(1+2+1).
%e A282693    42 = (4+2)*(4+2+1).
%e A282693    90 = (9+0)*(9+0+1).
%e A282693   156 = (1+5+6)*(1+5+6+1).
%t A282693 fQ[n_] := Block[{a = Plus @@ IntegerDigits@ n}, a*(a +1) == n]; Select[ Range[0, 1000], fQ] (* _Robert G. Wilson v_, Feb 24 2017 *)
%o A282693 (VBA)
%o A282693 Sub calcul()
%o A282693    Sheets("Result").Select
%o A282693    Range("A1").Select
%o A282693    For i = 1 To 10000000
%o A282693       Sum = 0
%o A282693       For k = 1 To Len(i)
%o A282693          Sum = Sum + Mid(i, k, 1)
%o A282693       Next
%o A282693       res = Sum * (Sum + 1)
%o A282693       If res = i Then
%o A282693          ActiveCell.Value = i
%o A282693          ActiveCell.Offset(1, 0).Select
%o A282693       End If
%o A282693    Next
%o A282693 End Sub
%K A282693 bref,base,fini,full,nonn
%O A282693 1,2
%A A282693 _Shmelev Aleksei_, Feb 24 2017