login
Sum of reciprocals of digits = 1.
9

%I #20 Jan 22 2021 10:04:07

%S 1,22,236,244,263,326,333,362,424,442,623,632,2488,2666,2848,2884,

%T 3366,3446,3464,3636,3644,3663,4288,4346,4364,4436,4444,4463,4634,

%U 4643,4828,4882,6266,6336,6344,6363,6434,6443,6626,6633,6662,8248,8284,8428,8482,8824

%N Sum of reciprocals of digits = 1.

%C This sequence has 1209 terms.

%C Intersection of A037264 and A034708: A214949(a(n))*A214950(a(n))*A168046(a(n)) = 1. - _Reinhard Zumkeller_, Aug 02 2012

%H Nathaniel Johnston, <a href="/A037268/b037268.txt">Table of n, a(n) for n = 1..1209</a> (full sequence)

%p A037268 := proc(n) option remember: local d,k: if(n=1)then return 1: fi: for k from procname(n-1)+1 do d:=convert(k,base,10): if(not member(0,d) and add(1/d[j],j=1..nops(d))=1)then return k: fi: od: end: seq(A037268(n),n=1..50); # _Nathaniel Johnston_, May 28 2011

%o (Haskell)

%o a037268 n = a037268_list !! (n-1)

%o a037268_list = filter ((== 1) . a168046) $

%o takeWhile (<= 999999999) a214959_list

%o -- _Reinhard Zumkeller_, Aug 02 2012

%o (PARI) lista(nn) = {for (n=1, nn, d = digits(n); if (vecmin(d) && (sum(k=1, #d, 1/d[k])==1), print1(n, ", ")););} \\ _Michel Marcus_, Jul 06 2015

%o (Python)

%o from fractions import Fraction

%o def ok(n):

%o sn = str(n)

%o return False if '0' in sn else sum(Fraction(1, int(d)) for d in sn) == 1

%o def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]

%o print(aupto(8824)) # _Michael S. Branicky_, Jan 22 2021

%Y Cf. A020473, A037264, A038034.

%Y Subsequence of A214959.

%K easy,nonn,base,fini,full

%O 1,2

%A _N. J. A. Sloane_.

%E More terms from _Christian G. Bower_, Jun 15 1998

%E Two missing terms inserted by _Nathaniel Johnston_, May 28 2011