login
This site is supported by donations to The OEIS Foundation.

 

Logo


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

%I

%S 0,12,42,90,156

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

%e 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)

%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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 19 16:56 EST 2018. Contains 299356 sequences. (Running on oeis4.)