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.

A034708 Numbers for which the sum of reciprocals of digits is an integer.

This page as a plain text file.
%I A034708 #26 Feb 17 2024 10:28:36
%S A034708 1,11,22,111,122,212,221,236,244,263,326,333,362,424,442,623,632,1111,
%T A034708 1122,1212,1221,1236,1244,1263,1326,1333,1362,1424,1442,1623,1632,
%U A034708 2112,2121,2136,2144,2163,2211,2222,2316,2361,2414,2441,2488,2613,2631,2666
%N A034708 Numbers for which the sum of reciprocals of digits is an integer.
%C A034708 Intersection of A214957 and A052382: A214950(a(n))*A168046(a(n)) = 1. - _Reinhard Zumkeller_, Aug 02 2012
%H A034708 Reinhard Zumkeller, <a href="/A034708/b034708.txt">Table of n, a(n) for n = 1..1000</a>
%t A034708 f[ n_ ] := 1/n a[ n_ ] := Apply[ Plus, Map[ f, IntegerDigits[ n ] ] ] Select[ Range[ 1000 ], FreeQ[ IntegerDigits[ # ], 0 ] && IntegerQ[ a [ # ] ] & ] (* _Santi Spadaro_, Oct 13 2001 *)
%t A034708 Select[Range[3000],DigitCount[#,10,0]==0 && IntegerQ[Total[ 1/IntegerDigits[#]]]&] (* _Harvey P. Dale_, May 06 2012 *)
%o A034708 (Haskell)
%o A034708 a034708 n = a034708_list !! (n-1)
%o A034708 a034708_list = filter ((== 1) . a168046) a214957_list
%o A034708 -- _Reinhard Zumkeller_, Aug 02 2012
%o A034708 (PARI) isok(n) = {my(d = digits(n)); vecmin(d) && denominator(sum(k=1, #d, 1/d[k])) == 1;} \\ _Michel Marcus_, Feb 12 2016
%o A034708 (Python)
%o A034708 from fractions import Fraction
%o A034708 def srd(n): return sum(Fraction(1, int(d)) for d in str(n)) # assumes no 0's
%o A034708 def ok(n): return False if '0' in str(n) else srd(n).denominator == 1
%o A034708 def aupto(nn): return [m for m in range(1, nn+1) if ok(m)]
%o A034708 print(aupto(2666)) # _Michael S. Branicky_, Jan 11 2021
%Y A034708 Cf. A052382, A168046, A214950, A214957.
%K A034708 nonn,base,nice
%O A034708 1,2
%A A034708 _Erich Friedman_