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
-
a037268 n = a037268_list !! (n-1)
a037268_list = filter ((== 1) . a168046) $
takeWhile (<= 999999999) a214959_list
-- Reinhard Zumkeller, Aug 02 2012
-
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
-
Select[Range[10000],Total[1/(IntegerDigits[#]/.(0->1))]==1&] (* Harvey P. Dale, Jul 23 2025 *)
-
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
-
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
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
-
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
-
dsr[n_] := Denominator[Total[1/Select[IntegerDigits[n], # > 0 &]]]; dsr /@ Range[0, 76] (* Jayanta Basu, Jul 13 2013 *)
-
a(n) = my(d=digits(n)); denominator(sum(k=1, #d, if (d[k], 1/d[k]))); \\ Michel Marcus, Jan 26 2022
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
-
a214957 n = a214957_list !! (n-1)
a214957_list = [x | x <- [0..], a214950 x == 1]
-
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
236 is a member as 1/2 + 1/3 +1/6 = 1.
-
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 *)
-
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
-
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
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
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.
-
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
-
Select[Prime@ Range@ 12000, If[MemberQ[#, 0], False, PrimeQ@ Total[1/#]] &@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 12 2016 *)
-
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
-
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
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.
-
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}]
-
\\ See links.
-
# See links.
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
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.
-
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:
-
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
{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.
Showing 1-9 of 9 results.
Comments