A056053
a(n) = smallest odd number 2m+1 such that the partial sum of the odd harmonic series Sum_{j=0..m} 1/(2j+1) is > n.
Original entry on oeis.org
1, 3, 15, 113, 837, 6183, 45691, 337607, 2494595, 18432707, 136200301, 1006391657, 7436284415, 54947122715, 406007372211, 3000011249847, 22167251422541, 163795064320249, 1210290918990281, 8942907496445513, 66079645178783351, 488266205223462461, 3607826381608149807
Offset: 0
- Calvin C. Clawson, "Mathematical Mysteries, The Beauty and Magic of Numbers," Plenum Press, NY and London, 1996, page 64.
-
s = 0; k = 1; Do[ While[s = N[s + 1/k, 24]; s <= n, k += 2]; Print[k]; k += 2, {n, 1, 11}]
A089365
Smallest prime whose product of digits is 2^n.
Original entry on oeis.org
11, 2, 41, 181, 281, 1481, 881, 4481, 18481, 48281, 48481, 228881, 284881, 828881, 884881, 4448881, 4848881, 18848881, 24888881, 48888841, 88884881, 188888881, 888828881, 848888881, 4848488881, 4488888881, 18848888881, 28888884881
Offset: 0
a(8) = 24481 and the digital product is 2^8.
-
NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; a = Table[0, {24}]; p = 2; Do[q = Log[2, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}] (* Robert G. Wilson v, Nov 08 2003 *)
For a(8): a = Map[ FromDigits, Join[{0}, #, {1}] & /@ Permutations[{2, 8, 8 }]]; Min[ Select[a, PrimeQ[ # ] & ]] (* Robert G. Wilson v, Nov 08 2003 *)
A088653
Smallest prime whose product of digits is 3^n.
Original entry on oeis.org
11, 3, 19, 139, 199, 1399, 1999, 13999, 99991, 139999, 199999, 1399999, 9999991, 19399999, 19999999, 919999939, 1399939999, 1999993999, 9199999999, 19399999999, 99999199999, 199999939999, 991999999999, 1999399999999
Offset: 0
a(5) = 1399 and the digital product is 3^5.
-
NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; a = Table[0, {18}]; p = 2; Do[q = Log[3, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]
For a(23): a = Map[ FromDigits, Join[{0}, # ] & /@ Permutations[{1, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 }]]; Min[ Select[a, PrimeQ[ # ] & ]]
For a(11): a = Map[ FromDigits, Permutations[{2, 6, 8, 8, 8, 9, 9, 9, 9, 9}]]; Min[ Select[a, PrimeQ[ # ] & ]]
A090840
Smallest prime whose product of digits is 5^n.
Original entry on oeis.org
11, 5, 11551, 15551, 1551551, 15551551, 1155555151, 1555551551, 11555555551, 1155155555551, 555555515551, 555555555551, 5555555555551, 555155555555551, 51555555551555551, 51555555555555551, 1155555555555555551, 15551555555555555551, 1155515555555555555551
Offset: 0
a(4) = 1551551 because its digital product is 5^4, and it is prime.
-
a:= proc(n) local k, t; for k from 0 do t:= min(select(isprime,
map(x-> parse(cat(x[])), combinat[permute]([1$k, 5$n]))));
if tAlois P. Heinz, Nov 05 2021
-
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {18}]; p = 2; Do[q = Log[5, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]
For a(13); a = Map[ FromDigits, Permutations[{1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}]]; Min[ Select[a, PrimeQ[ # ] &]]
-
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations as mp
def a(n):
if n < 2: return [11, 5][n]
digits = n + 1
while True:
for p in mp("1"*(digits-n-1) + "5"*n, digits-1):
t = int("".join(p) + "1")
if isprime(t): return t
digits += 1
print([a(n) for n in range(19)]) # Michael S. Branicky, Nov 05 2021
A090841
Smallest prime whose product of digits is 7^n.
Original entry on oeis.org
11, 7, 11177, 1777, 71777, 1777717, 1177717771, 77777177, 7177717777, 1777777777, 71777777777, 1717777777777, 7177777777777, 17777777777777, 17177777777777717, 7717777777777777, 1177777777177777777, 1777777777777777177, 7777177777777777777
Offset: 0
a(6) = 1177717771 because its digital product is 7^6, and it is prime.
-
a:= proc(n) local k, t; for k from 0 do t:= min(select(isprime,
map(x-> parse(cat(x[])), combinat[permute]([1$k, 7$n]))));
if tAlois P. Heinz, Nov 07 2021
-
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {18}]; p = 2; Do[q = Log[7, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]
For a(8); a = Map[ FromDigits, Permutations[{1, 1, 7, 7, 7, 7, 7, 7, 7, 7}]]; Min[ Select[a, PrimeQ[ # ] &]]
-
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations as mp
def a(n):
if n < 2: return [11, 7][n]
digits = n
while True:
for p in mp("1"*(digits-n) + "7"*n, digits):
t = int("".join(p))
if isprime(t): return t
digits += 1
print([a(n) for n in range(19)]) # Michael S. Branicky, Nov 07 2021
A056054
a(n) = smallest even number 2m such that value of odd harmonic series Sum_{j=0..m} 1/(2j) is > n.
Original entry on oeis.org
8, 62, 454, 3348, 24734, 182760, 1350428, 9978382, 73730824, 544801200, 4025566630, 29745137662, 219788490858, 1624029488844, 12000044999386, 88669005690160, 655180257281000, 4841163675961122, 35771629985782052
Offset: 1
- Calvin C. Clawson, Mathematical Mysteries, The Beauty and Magic of Numbers, Plenum Press, NY and London, 1996, page 64.
-
s = 0; k = 2; Do[ While[s = N[s + 1/k, 24]; s <= n, k += 2]; Print[k]; k += 2, {n, 1, 12}]
(* or assuming that the Mathematica coding in A002387 is correct then *)
b[n_] := Module[{k = Floor[2a[2n]]}, If[ EvenQ[k], k, k + 1]]; Table[ b[n], {n, 19}] (* Robert G. Wilson v, Apr 17 2004 *)
A089298
Smallest prime with digit product 10^n.
Original entry on oeis.org
11, 251, 14551, 155581, 4545551, 45555581, 555555881, 44555555581, 455555558581, 5555555888551, 255555555585881, 14555555558558851, 155555555858885551, 2555555555558885851, 45555555555585855881
Offset: 0
a(4) = 4545551 and the digit product = 10^4.
-
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {10}]; p = 2; Do[ q = Log[10, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]; a
Showing 1-7 of 7 results.
Comments