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!)
A124095 Happy numbers without zeros and with digits in nondecreasing order. 4

%I #17 Aug 03 2023 04:11:28

%S 1,7,13,19,23,28,44,49,68,79,129,133,139,167,188,226,236,239,338,356,

%T 367,368,379,446,469,478,556,566,888,899,1112,1114,1115,1122,1125,

%U 1128,1148,1158,1177,1188,1222,1233,1247,1257,1258,1277,1288,1299,1333,1335

%N Happy numbers without zeros and with digits in nondecreasing order.

%H Bryan Wolf, <a href="/A124095/b124095.txt">Table of n, a(n) for n = 0..13376</a> (terms < 10^10))

%H Bryan Wolf, <a href="/A124095/a124095.cpp.txt">C++ program for generating happy numbers without zeros and with digits in non-decreasing order</a>

%o (Python)

%o from itertools import count, islice, combinations_with_replacement

%o def A124095_gen(): # generator of terms

%o for l in count(1):

%o for m in combinations_with_replacement('123456789',l):

%o k = t = int(''.join(m))

%o while k not in {1,37,58,89,145,42,20,4,16}:

%o k = sum((0, 1, 4, 9, 16, 25, 36, 49, 64, 81)[ord(d)-48] for d in str(k))

%o if k == 1:

%o yield t

%o A124095_list = list(islice(A124095_gen(),20)) # _Chai Wah Wu_, Aug 02 2023

%Y Cf. A007770 (Happy numbers), A068571, A219667.

%K base,nonn

%O 0,2

%A _Tanya Khovanova_, Nov 25 2006

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 April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)