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-9 of 9 results.

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

A214950 Denominator of sum of reciprocals of all nonzero digits of n in decimal representation.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 1, 6, 4, 10, 3, 14, 8, 18, 3, 3, 6, 3, 12, 15, 2, 21, 24, 9, 4, 4, 4, 12, 2, 20, 12, 28, 8, 36, 5, 5, 10, 15, 20, 5, 30, 35, 40, 45, 6, 6, 3, 2, 12, 30, 3, 42, 24, 18, 7, 7, 14, 21, 28, 35, 42
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 02 2012

Keywords

Crossrefs

Cf. A214949 (numerators).

Programs

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

Formula

a(A034708(n)) = a(A037268(n)) = a(A214957(n)) = a(A214959(n)) = 1;
a(n) = a(A004719(n)).

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 *)

A091784 Numbers n with digits in nondecreasing order such that sum of the reciprocal of digits is an integer.

Original entry on oeis.org

1, 11, 22, 111, 122, 236, 244, 333, 1111, 1122, 1236, 1244, 1333, 2222, 2488, 2666, 3366, 3446, 4444, 11111, 11122, 11236, 11244, 11333, 12222, 12488, 12666, 13366, 13446, 14444, 22236, 22244, 22333, 26999, 28888, 33999, 34688, 36666, 44488, 44666, 55555, 111111, 111122
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2004

Keywords

Comments

236 is a member and 263, 326, 362, 623, 632 which are digit permutations of 236 are not included (unlike A037268). Subsidiary sequences: (1) Sum of the reciprocals of all n-digit members. (2) Let the terms with reciprocal sum n be arranged in nondecreasing order. (i) The n-th term in the above sequence (2). (ii) The number of digits in this term of (i).
Subsequence of A009994. - David A. Corneth, Sep 05 2016

Examples

			236 is a member as 1/2 + 1/3 +1/6 = 1.
		

Crossrefs

Programs

  • Mathematica
    Do[l = IntegerDigits[n]; If[Intersection[l, {0}] == {} && IntegerQ[Plus @@ Map[(1/#)&, l]] && Sort[l] == l, Print[n]], {n, 1, 10^5}] (* Ryan Propper, Aug 27 2005 *)
    Select[Range[50000],Min[Differences[IntegerDigits[#]]]>=0&&IntegerQ[ Total[ 1/IntegerDigits[#]]]&] (* Harvey P. Dale, Aug 22 2016 *)
  • PARI
    is(n)=my(d=digits(n), v=vecsort(d),s); if(d==v, s=sum(i=1,#d,1/d[i]); s==s\1, 0) \\ David A. Corneth, Sep 06 2016
    
  • PARI
    getNDigitTerms(n)=my(v=List(),t); forvec(x=vector(8,i,[0,n]), my(u=vector(n,i,1),X=concat(x,n)); for(i=2,9, for(j=X[i-1]+1, X[i],u[j]=i)); if(denominator(sum(i=1,#u,1/u[i]))==1, listput(v,fromdigits(u))),1); Set(v) \\ Charles R Greathouse IV, Sep 06 2016

Extensions

More terms from Ryan Propper, Aug 27 2005
Name corrected by David A. Corneth, Sep 05 2016

A266815 Primes whose sum of reciprocal of digits is a prime.

Original entry on oeis.org

11, 2441, 3313, 3331, 4241, 4421, 12163, 12613, 13313, 13331, 16231, 16363, 16633, 21163, 21613, 26113, 31663, 32233, 32323, 32611, 33113, 33223, 33311, 48281, 48821, 61231, 61363, 62131, 62311, 63211, 63361, 88241, 112121, 114643, 116443, 122263, 123323, 126223
Offset: 1

Views

Author

Paolo P. Lava, Feb 12 2016

Keywords

Comments

Subset of A034708.

Examples

			11: 1/1 + 1/1 = 2;
2441: 1/2 + 1/4 + 1/4 + 1/1 = 2;
3313: 1/3 + 1/3 + 1/1 + 1/3 = 2; etc.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,k,n,ok;
    for n from 1 to q do if isprime(n) then ok:=1; a:=0; for k from 0 to ilog10(n) do
    if trunc(n/10^k) mod 10>0 then a:=a+1/(trunc(n/10^k) mod 10) else ok:=0; break; fi; od;
    if ok=1 and type(a,integer) then if isprime(a) then print(n) fi; fi; fi; od; end: P(10^9);
    # Alternative:
    N:= 8: # to get all terms of up to N digits
    S1:= proc(t,k,N)
        option remember;
        if t = 0 then {[]}
        elif k = 0 then {}
        else
          `union`(seq(map(p -> [op(p),k$m], procname(t - m*2520/k, k-1,N-m)),
             m = 0 .. min(N, floor(t*k/2520))))
        fi
    end proc:
    targets:= 2520*select(isprime,[$2..N]):
    Dlists:= select(p -> convert(p,`+`) mod 3 <> 0, `union`(seq(S1(t,9,N),t=targets))):
    g:= proc(L) local i,m;
       m:= nops(L);
       op(select(isprime, map(t -> add(t[i]*10^(i-1),i=1..m), combinat:-permute(L))));
    end proc:
    sort(convert(map(g, Dlists),list)); # Robert Israel, Feb 12 2016
  • Mathematica
    Select[Prime@ Range@ 12000, If[MemberQ[#, 0], False, PrimeQ@ Total[1/#]] &@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 12 2016 *)
  • PARI
    isok(n) = if (isprime(n), my(d = digits(n)); vecmin(d) && (denominator(s=sum(k=1, #d, 1/d[k])) == 1) && isprime(s)) \\ Michel Marcus, Feb 12 2016

A064779 Primes such that the sum of their digits and the sum of the reciprocals of their digits is also prime.

Original entry on oeis.org

11, 2441, 4241, 4421, 12163, 12613, 13313, 13331, 16231, 16363, 16633, 21163, 21613, 26113, 31663, 32233, 32323, 32611, 33113, 33223, 33311, 48281, 48821, 61231, 61363, 62131, 62311, 63211, 63361, 88241
Offset: 1

Views

Author

Santi Spadaro, Oct 19 2001

Keywords

Comments

Zero, five, and seven never appear as a digit of any of the terms of this sequence. - Harvey P. Dale, Jul 17 2013

Crossrefs

Cf. A034708.

Programs

  • Mathematica
    f[ n_ ] := 1/n a[ n_ ] := Apply[ Plus, Map[ f, IntegerDigits[ n ] ] ] b[ n_ ] := Apply[ Plus, IntegerDigits[ n ] ] Select[ Range[ 100000 ], FreeQ[ IntegerDigits[ # ], 0 ] && PrimeQ[ a[ # ] ] && PrimeQ[ b[ # ] ] && PrimeQ[ # ] & ]
    sdpQ[n_]:=Module[{idn=IntegerDigits[n]},Min[idn]>0&&And@@PrimeQ[{Total[ idn], Total[ 1/idn]}]]; Select[Prime[Range[10000]],sdpQ] (* Harvey P. Dale, Jul 17 2013 *)

A354466 Numbers k such that the decimal expansion of the sum of the reciprocals of the digits of k starts with the digits of k in the same order.

Original entry on oeis.org

1, 13, 145, 153, 1825, 15789, 16666, 21583, 216666, 2416666, 28428571, 265833333, 3194444444, 3333333333, 9111111111, 35333333333, 3166666666666, 3819444444444, 26666666666666, 34166666666666, 527857142857142, 3944444444444444, 6135714285714285, 615833333333333333
Offset: 1

Views

Author

Metin Sariyar, Jun 01 2022

Keywords

Comments

The sequence is infinite because all numbers of the form 10^(10^n-6) + 6*(10^(10^n-6)-1)/9, (n>0) are terms.
All terms are zeroless since 1/0 is undefined.
If n gives a sum < 1 then that sum is taken as 0.xyz.. but n does not start with 0, so not a term.

Examples

			28428571 is a term because 1/2 + 1/8 + 1/4 + 1/2 + 1/8 + 1/5 + 1/7 + 1/1 = 2.8428571...
825 is not a term since 1/8 + 1/2 + 1/5 = 0.825.
		

Crossrefs

Programs

  • Mathematica
    Do[If[FreeQ[IntegerDigits[n], 0]&&Floor[Total[1/IntegerDigits[n]]*10^(IntegerLength[n]-IntegerLength[Floor[Total[1/IntegerDigits[n]]]])]==n&&Floor[Total[1/IntegerDigits[n]]]>0, Print[n]], {n, 1, 216666}]
  • PARI
    \\ See links.
  • Python
    # See links.
    

Extensions

a(12)-a(24) from Michael S. Branicky, Jun 03 2022

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

Original entry on oeis.org

1, 11, 111, 1111, 2222, 11111, 12222, 21222, 22122, 22212, 22221, 111111, 112222, 121222, 122122, 122212, 122221, 211222, 212122, 212212, 212221, 221122, 221212, 221221, 222112, 222121, 222211, 222336, 222363, 222633, 223236, 223263, 223326, 223362, 223623
Offset: 1

Views

Author

Michel Lagneau, Apr 29 2012

Keywords

Examples

			223623 is in the sequence because 1/2^2 + 1/2^2 + 1/3^2 + 1/6^2 + 1/2^2 + 1/3^2 = 1 is an integer.
		

Crossrefs

Cf. A034708.

Programs

  • Maple
    T:=array(1..10):for n from 1 to 10^7 do:T:=convert(n,base,10):n1:=nops(T): s:=0:j:=0:for k from 1 to n1 do:if T[k]<>0 then s:=s+evalf(1/T[k]^2):else j:=1:fi: od: if j=0 and s=floor(s) then printf(`%d, `,n):else fi:od:
  • Mathematica
    f[ n_ ] := 1/n^2; a[ n_ ] := Apply[ Plus, Map[ f, IntegerDigits[ n ] ] ] ; Select[ Range[ 1000 ], FreeQ[ IntegerDigits[ # ], 0 ] && IntegerQ[ a [ # ] ] & ]

A275666 Multisets of numbers such that the sum of reciprocals is 1 and each element e occurs at most lpf(e) - 1 times.

Original entry on oeis.org

2, 3, 6, 2, 5, 5, 10, 3, 5, 5, 6, 10, 2, 4, 6, 12, 3, 3, 4, 12, 4, 5, 5, 6, 10, 12, 2, 7, 7, 7, 14, 3, 6, 7, 7, 7, 14, 4, 6, 7, 7, 7, 12, 14, 5, 5, 7, 7, 7, 10, 14, 2, 3, 10, 15, 2, 4, 10, 12, 15, 2, 5, 6, 15, 15, 3, 3, 5, 15, 15, 3, 3, 6, 10, 15, 3, 5, 5, 5, 15, 3, 4
Offset: 1

Views

Author

David A. Corneth, Aug 23 2016

Keywords

Comments

lpf(n) gives the least prime factor of n (A020639(n)).
The multisets are ordered primarily by largest element, then secondly by length, then thirdly by smallest distinct element.
Sets are placed in nondecreasing order. The separation between two sets is where an element a(n) > a(n + 1).
Let M be the largest element of a multiset. No primes >= (M + 1)/2 are in that multiset.
This sequence may be used to find multisets that have the sum of reciprocals an integer, along with the following operations.
In a set we can replace a number by twice its double. For example, in (2, 3, 6), we can replace the 6 by two twelves, giving {2, 3, 12, 12}. The sum of reciprocals is still 1. However 12 occurs twice in the set, more than lpf(12) - 1 = 1.
{3, 4, 4, 6} isn't included as we could replace two fours by one 2 to get {2, 3, 6}. To exclude such possibilities, each element e is in a multiset at most lpf(e) - 1.
We can also take the union of two sets, for example the sets {2, 3, 6} and {2, 5, 5, 10} giving {2, 2, 3, 5, 5, 6, 10} which has sum of reciprocals 1 + 1 = 2.
We can put 1 in a set, so from {2, 3, 6} we can find {1, 2, 3, 6}.
Using any such operations, we get out of the sequence but more terms of A034708 can be found and A020473 may be investigated further.

Examples

			{2, 3, 6}
{2, 5, 5, 10}
{3, 5, 5, 6, 10}
{2, 4, 6, 12}
{3, 3, 4, 12}
{4, 5, 5, 6, 10, 12}
{2, 7, 7, 7, 14}
{3, 6, 7, 7, 7, 14}
{4, 6, 7, 7, 7, 12, 14}
{5, 5, 7, 7, 7, 10, 14}
{2, 3, 10, 15}
{2, 4, 10, 12, 15}
{2, 5, 6, 15, 15}
{3, 3, 5, 15, 15}
{3, 3, 6, 10, 15}
{3, 5, 5, 5, 15}
...
{3, 3, 4, 12} comes before {2, 7, 7, 7, 14} because the largest element of the first is less than the one from the second.
{2, 5, 5, 10} comes before {3, 5, 5, 6, 10} because they both have the largest element 10 but the latter has more elements.
{2, 4, 10, 12, 15} comes before {2, 5, 6, 15, 15} because they both have the largest element 15 and the same number of elements but the first smallest different element, 4 resp. 5, is less for the first.
		

Crossrefs

Showing 1-9 of 9 results.