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.

Showing 1-5 of 5 results.

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

Original entry on oeis.org

1, 11, 22, 111, 122, 212, 221, 236, 244, 263, 326, 333, 362, 424, 442, 623, 632, 1111, 1122, 1212, 1221, 1236, 1244, 1263, 1326, 1333, 1362, 1424, 1442, 1623, 1632, 2112, 2121, 2136, 2144, 2163, 2211, 2222, 2316, 2361, 2414, 2441, 2488, 2613, 2631, 2666
Offset: 1

Views

Author

Keywords

Comments

Intersection of A214957 and A052382: A214950(a(n))*A168046(a(n)) = 1. - Reinhard Zumkeller, Aug 02 2012

Crossrefs

Programs

  • Haskell
    a034708 n = a034708_list !! (n-1)
    a034708_list = filter ((== 1) . a168046) a214957_list
    -- Reinhard Zumkeller, Aug 02 2012
    
  • Mathematica
    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 *)
    Select[Range[3000],DigitCount[#,10,0]==0 && IntegerQ[Total[ 1/IntegerDigits[#]]]&] (* Harvey P. Dale, May 06 2012 *)
  • PARI
    isok(n) = {my(d = digits(n)); vecmin(d) && denominator(sum(k=1, #d, 1/d[k])) == 1;} \\ Michel Marcus, Feb 12 2016
    
  • Python
    from fractions import Fraction
    def srd(n): return sum(Fraction(1, int(d)) for d in str(n)) # assumes no 0's
    def ok(n): return False if '0' in str(n) else srd(n).denominator == 1
    def aupto(nn): return [m for m in range(1, nn+1) if ok(m)]
    print(aupto(2666)) # Michael S. Branicky, Jan 11 2021

A037268 Sum of reciprocals of digits = 1.

Original entry on oeis.org

1, 22, 236, 244, 263, 326, 333, 362, 424, 442, 623, 632, 2488, 2666, 2848, 2884, 3366, 3446, 3464, 3636, 3644, 3663, 4288, 4346, 4364, 4436, 4444, 4463, 4634, 4643, 4828, 4882, 6266, 6336, 6344, 6363, 6434, 6443, 6626, 6633, 6662, 8248, 8284, 8428, 8482, 8824
Offset: 1

Views

Author

Keywords

Comments

This sequence has 1209 terms.
Intersection of A037264 and A034708: A214949(a(n))*A214950(a(n))*A168046(a(n)) = 1. - Reinhard Zumkeller, Aug 02 2012

Crossrefs

Subsequence of A214959.

Programs

  • Haskell
    a037268 n = a037268_list !! (n-1)
    a037268_list = filter ((== 1) . a168046) $
                          takeWhile (<= 999999999) a214959_list
    -- Reinhard Zumkeller, Aug 02 2012
    
  • Maple
    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
  • Mathematica
    Select[Range[10000],Total[1/(IntegerDigits[#]/.(0->1))]==1&] (* Harvey P. Dale, Jul 23 2025 *)
  • 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
    
  • Python
    from fractions import Fraction
    def ok(n):
      sn = str(n)
      return False if '0' in sn else sum(Fraction(1, int(d)) for d in sn) == 1
    def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
    print(aupto(8824)) # Michael S. Branicky, Jan 22 2021

Extensions

More terms from Christian G. Bower, Jun 15 1998
Two missing terms inserted by Nathaniel Johnston, May 28 2011

A214949 Numerator of sum of reciprocals of all nonzero digits of n in decimal representation.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3, 1, 5, 3, 7, 2, 9, 5, 11, 1, 4, 5, 2, 7, 8, 1, 10, 11, 4, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 1, 6, 7, 8, 9, 2, 11, 12, 13, 14, 1, 7, 2, 1, 5, 11, 1, 13, 7, 5, 1, 8, 9, 10, 11, 12, 13, 2, 15, 16
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 02 2012

Keywords

Crossrefs

Cf. A214950 (denominators).

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a214949 = f 0 where
       f y 0 = numerator y
       f y x = f (y + if d == 0 then 0 else 1 % d) x'
               where (x',d) = divMod x 10
    
  • Mathematica
    nsr[n_] := Numerator[Total[1/Select[IntegerDigits[n], # > 0 &]]]; nsr /@ Range[0, 79] (* Jayanta Basu, Jul 13 2013 *)
  • PARI
    a(n) = my(d=digits(n)); numerator(sum(k=1, #d, if (d[k], 1/d[k]))); \\ Michel Marcus, Jan 26 2022

Formula

a(A037264(n)) = a(A037268(n)) = a(A214958(n)) = a(A214959(n)) = 1;
a(n) = a(A004719(n)).

A214959 Numbers for which the sum of reciprocals of nonzero digits = 1.

Original entry on oeis.org

1, 10, 22, 100, 202, 220, 236, 244, 263, 326, 333, 362, 424, 442, 623, 632, 1000, 2002, 2020, 2036, 2044, 2063, 2200, 2306, 2360, 2404, 2440, 2488, 2603, 2630, 2666, 2848, 2884, 3026, 3033, 3062, 3206, 3260, 3303, 3330, 3366, 3446, 3464, 3602, 3620, 3636
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 02 2012

Keywords

Comments

Intersection of A214957 and A214958: A214949(a(n))*A214950(a(n)) = 1.

Crossrefs

Cf. A037268 (subsequence).

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    a214959 n = a214959_list !! (n-1)
    a214959_list = [x | x <- [0..], f x 0] where
       f 0 v = numerator v == 1 && denominator v == 1
       f u v | d > 0     = f u' (v + 1 % d)
             | otherwise = f u' v  where (u',d) = divMod u 10
    
  • Magma
    SumReciprocalsDigits:=func; [n: n in [1..3636] | IsOne(SumReciprocalsDigits(n))]; // Bruno Berselli, Aug 02 2012
  • Mathematica
    idnQ[n_]:=Total[1/Select[IntegerDigits[n],#>0&]]==1; Select[Range[ 4000],idnQ] (* Harvey P. Dale, Dec 08 2012 *)

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

Original entry on oeis.org

0, 1, 10, 11, 22, 100, 101, 110, 111, 122, 202, 212, 220, 221, 236, 244, 263, 326, 333, 362, 424, 442, 623, 632, 1000, 1001, 1010, 1011, 1022, 1100, 1101, 1110, 1111, 1122, 1202, 1212, 1220, 1221, 1236, 1244, 1263, 1326, 1333, 1362, 1424, 1442, 1623, 1632
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 02 2012

Keywords

Comments

A214950(a(n)) = 1.

Crossrefs

Cf. A034708 (subsequence).

Programs

  • Haskell
    a214957 n = a214957_list !! (n-1)
    a214957_list = [x | x <- [0..], a214950 x == 1]
  • Mathematica
    Join[{0},Select[Range[2000],IntegerQ[Total[1/DeleteCases[ IntegerDigits[ #],0]]]&]] (* Harvey P. Dale, Sep 21 2014 *)
Showing 1-5 of 5 results.