login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282693 Numbers k such that k = (sum of digits of k)*((sum of digits of k) + 1). 0

%I

%S 0,12,42,90,156

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

%e 0 = 0*(0+1).

%e 12 = (1+2)*(1+2+1).

%e 42 = (4+2)*(4+2+1).

%e 90 = (9+0)*(9+0+1).

%e 156 = (1+5+6)*(1+5+6+1).

%t fQ[n_] := Block[{a = Plus @@ IntegerDigits@ n}, a*(a +1) == n]; Select[ Range[0, 1000], fQ] (* _Robert G. Wilson v_, Feb 24 2017 *)

%o (VBA)

%o Sub calcul()

%o Sheets("Result").Select

%o Range("A1").Select

%o For i = 1 To 10000000

%o Sum = 0

%o For k = 1 To Len(i)

%o Sum = Sum + Mid(i, k, 1)

%o Next

%o res = Sum * (Sum + 1)

%o If res = i Then

%o ActiveCell.Value = i

%o ActiveCell.Offset(1, 0).Select

%o End If

%o Next

%o End Sub

%K bref,base,fini,full,nonn

%O 1,2

%A _Shmelev Aleksei_, Feb 24 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 22 04:12 EDT 2022. Contains 353933 sequences. (Running on oeis4.)