OFFSET
1,2
COMMENTS
Intersection of A214958 and A052382: A214949(a(n))*A168046(a(n)) = 1. - Reinhard Zumkeller, Aug 02 2012
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1232 (complete sequence)
EXAMPLE
63 is a term: 1/((1/6) + (1/3)) = 2.
MATHEMATICA
Reap[Do[If[FreeQ[id = IntegerDigits[n], 0], If[IntegerQ[1/Total[1/id]], Sow[n]]], {n, 1, 10^4}]][[2, 1]] (* Jean-François Alcover, Dec 15 2015 *)
Select[Range[6500], FreeQ[IntegerDigits[#], 0]&&IntegerQ[1/Total[1/IntegerDigits[#]]]&] (* Harvey P. Dale, Sep 29 2024 *)
PROG
(Haskell)
a037264 n = a037264_list !! (n-1)
a037264_list = filter ((== 1) . a168046) $
takeWhile (<= 999999999) a214958_list
-- Reinhard Zumkeller, Aug 02 2012
(PARI) isok(n) = {my(d=digits(n)); vecmin(d) && (numerator(sum(k=1, #d, 1/d[k])) == 1); } \\ Michel Marcus, May 24 2018
(Python)
from fractions import Fraction
def ok(n):
ds = list(map(int, str(n)))
return 0 not in ds and sum(Fraction(1, d) for d in ds).numerator == 1
print(list(filter(ok, range(1, 6337)))) # Michael S. Branicky, Aug 08 2021
CROSSREFS
KEYWORD
easy,nonn,nice,base,fini,full
AUTHOR
STATUS
approved