Friday, May 31, 2024

A373291 Contribution to the OEIS



A373291
This is one of my favorite sequences.

Least perfect power of n containing some decimal digit of n.
+30
0
1, 32, 243, 64, 25, 36, 16807, 32768, 729, 100, 121, 144, 169, 196, 225, 256, 4913, 5832, 361, 400, 441, 234256, 529, 13824, 625, 676, 729, 784, 24389, 900, 961, 1024, 35937, 39304, 1225, 1296, 1369, 54872, 59319, 1600 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,2
COMMENTS
"Perfect power of n" here means n^k with k>1. The sequence gives the value of n^k, not the value of k. - N. J. A. Sloane, May 31 2024
LINKS
FORMULA
a(n) = n^A253600(n).
EXAMPLE
For n=12, 12^2=144 contains digit 1 from n so that a(12) = 144.
MATHEMATICA
seq={}; Do[k=1; Until[ ContainsAny[IntegerDigits[n], IntegerDigits[n^k] ], k++ ]; AppendTo[seq, n^k] , {n, 40}]; seq
PROG
(PARI) a(n) = my(sd = Set(vecsort(digits(n))), k=2); while (#setintersect(sd, Set(vecsort(digits(n^k)))) == 0, k++); n^k; \\ Michel Marcus, May 31 2024
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
James C. McMahon, May 30 2024
STATUS
approved

A373203 Contribution to the OEIS

 

A373203nulla(n) = minimum k>1 such that n^k contains all distinct decimal digits of n.0
2, 2, 5, 5, 3, 2, 2, 5, 5, 3, 2, 2, 3, 5, 4, 6, 5, 5, 5, 7, 5, 3, 4, 7, 3, 2, 8, 2, 5, 3, 5, 4, 3, 3, 3, 6, 6, 5, 4, 3, 3, 6, 7, 4, 3, 4, 4, 4, 4, 3, 2, 3, 7, 5, 3, 2, 3, 5, 5, 3, 2, 3, 5, 2, 2, 3, 2, 3, 4, 5, 5, 3, 3, 3, 2, 3, 2, 5, 5, 5, 5 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
0,1
LINKS
FORMULA
A253600(n) <= a(n) <= A045537(n). - Michael S. Branicky, May 28 2024
A111442(n) = n^a(n).
EXAMPLE
For n=12, a(12)=3 because 12^3=1728 contains all decimal digits of n. Compare to A253600(12)=2 because 12^2=144 contains any digit of n.
MATHEMATICA
seq={}; Do[k=1; Until[ContainsAll[IntegerDigits[n^k], IntegerDigits[n] ], k++]; AppendTo[seq, k] , {n, 0, 80}]; seq
PROG
(Python)
from itertools import count
def a(n):
s = set(str(n))
return next(k for k in count(2) if s <= set(str(n**k)))
print([a(n) for n in range(81)]) # Michael S. Branicky, May 27 2024
CROSSREFS
Sequence in context: A005177 A357123 A253600 * A045537 A243941 A161622
KEYWORD
nonn,base,new
AUTHOR
James C. McMahon, May 27 2024
STATUS
approved

Monday, May 27, 2024

Guinness Beer and Statistics

 

(Image: https://www.iconfinder.com/search/icons?family=ionicons-fill )

Student's t-test is a common statistical test using the t-distribution developed by William Gosset. William Gosset. Gosset worked at the Guinness brewery in Dublin and his employer preferred that staff use pen names when publishing scientific papers, so in 1908 he published under the pseudonym, Student, when his work was published in the journal, Biometrika.

The t-distribution is used when one has small sample sizes. The distribution has a bell-shape like the normal distribution but is wider at the tails. 

In May, 2024, Scientific America published an opinion piece about this important contribution to the field of statistics: How the Guinness Brewery Invented the Most Important Statistical Method in Science: How the Guinness Brewery Invented the Most Important Statistical Method in Science.

Friday, May 24, 2024

Proving the Existence of God

 

(Image: https://www.iconfinder.com/ekarifqi001)


I recently read an article about Kurt Gödel's proof of the existence of God. This blog has included other posts about religious mathematicians, including: 

https://jamesmacmath.blogspot.com/2023/12/book-review-zero-biography-of-dangerous.html

https://jamesmacmath.blogspot.com/2023/10/how-does-math-formula-highlight-creator.html

https://jamesmacmath.blogspot.com/2023/09/anniversary-of-eulers-death.html

https://jamesmacmath.blogspot.com/2022/09/alec-wilkinson-staff-writer-for-new.html

https://jamesmacmath.blogspot.com/2022/02/perfect-number-generator.html

https://jamesmacmath.blogspot.com/2022/01/maths-true-source-man-or-nature.html

https://jamesmacmath.blogspot.com/2020/05/george-lemaitre-and-big-bang.html

https://jamesmacmath.blogspot.com/2020/05/thomas-bayes-attempt-to-prove-existence.html

 

I had a goal of writing a post that summarizes these many theories, however, during my research, I found an article by Manon Bischoff in Scientific American that already has a very good summary. It includes many of the theories of the scientists and mathematicians from the above links and the summary of Kurt Gödel's proposed proof. I recommend readers of this blog to his article.

Thursday, May 16, 2024

200th - Triple Experience

 200

In one week, I had a triple  experience with the number 200: I made my 200th post to my math blog ( https://jamesmacmath.blogspot.com), donated my 200th  blood product, and made my 200th contribution to the On-Line Encyclopedia of Integer Sequences OEIS-(https://oeis.org/search?q=James+C.+McMahon+&sort=created&go=Search ).


Thursday, May 9, 2024

Unification of Different Fields of Mathematics

(Image: https://www.iconfinder.com/roywj)


During WWII, André Weil proposed an idea for linking three fields of mathematics: number theory, geometry, and finite fields.

For the full story, please see the following link it Quanta Magazine's  article describing the unification of three major branches of mathematics: A Rosetta Stone of Mathematics. 

Also related, is the work begun by Robert Langlands, known as the Langlands program.

A371030 Contribution to the OEIS

 

A371030n written in compositorial base.0
0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 42, 43, 50, 51, 52, 53, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 123, 130, 131, 132, 133, 140, 141, 142, 143, 150, 151, 152, 153, 200, 201, 202, 203, 210, 211, 212, 213 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
0,3
COMMENTS
Compositorial base is a mixed-radix representation using the composite numbers (A002808) from least to most significant.
Places reading from right have values (1, 4, 24, 192, ...) = compositorial numbers (A036691).
a(n) = concatenation of decimal digits of n in compositorial base. This concatenated representation is unsatisfactory for large n (above 172799), when coefficients of 10 or greater start to appear.
LINKS
EXAMPLE
a(35)=123; 35 = 1*24 + 2*4 + 3*1.
MATHEMATICA
Table[FromDigits@ IntegerDigits[n, MixedRadix[Reverse@ ResourceFunction["Composite"]@ Range@ 8]], {n, 0, 55}]
CROSSREFS
Sequence in context: A301382 A288657 A055655 * A276326 A007090 A102859
KEYWORD
nonn,base,less
AUTHOR
James C. McMahon, Mar 08 2024
STATUS
approved

A370831 Contribution to the OEIS

 

A370831Alternating sum of composites.0
4, 2, 6, 3, 7, 5, 9, 6, 10, 8, 12, 9, 13, 11, 14, 12, 15, 13, 17, 15, 18, 16, 19, 17, 21, 18, 22, 20, 24, 21, 25, 23, 26, 24, 27, 25, 29, 26, 30, 27, 31, 29, 33, 30, 34, 31, 35, 33, 36, 34, 38, 36, 39, 37, 40, 38, 42, 39, 43, 41, 44, 42, 45, 43, 47, 44, 48, 45, 49, 46 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,1
COMMENTS
Unlike equivalent sequence for primes, A008347, there are repeated terms.
LINKS
FORMULA
a(n) = A002808(n) - a(n-1), for n>1.
EXAMPLE
a(4) = 9 - 8 + 6 - 4 = 3.
MATHEMATICA
Join[{4}, a[1]=4; a[n_]:=ResourceFunction["Composite"][n] - a[n-1]; Table[a[n], {n, 2, 70}]] (* or with signs *) R=70; a[1]=4; a[n_]:=a[n-1]-ResourceFunction["Composite"][n] *(-1)^n; Table[a[n], {n, 70}]
CROSSREFS
Sequence in context: A246879 A302794 A247361 * A297307 A163238 A097362
KEYWORD
nonn
AUTHOR
James C. McMahon, Mar 02 2024
STATUS
approved

A368805 Contribution to the OEIS

 

A368805Primes whose digits are prime in both base 9 and base 10.0
2, 3, 5, 7, 23, 227, 277, 2777, 5333, 5573, 23537, 23753, 25373, 225527, 25737557, 27775337, 27775357, 35275777, 35277233, 37333757, 227773753, 227775533, 232372577, 233752577, 252777737, 337777277, 25322233723, 25322237323, 25322237357, 25322237723, 25322327753, 25322327777, 25322532523 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,1
COMMENTS
Subsequence of A019546.
LINKS
EXAMPLE
2777 is in this sequence because it is prime, all its digits are prime and 2777 in base 9 is 3725, whose digits are all prime.
MATHEMATICA
Select[Range[2.1*10^7], PrimeQ[#]&&AllTrue[IntegerDigits[#], PrimeQ]&&AllTrue[IntegerDigits[#, 9], PrimeQ]&] (* or *)
seq1[dignum_, b_] := Module[{s = {}}, Do[s = Join[s, Select[FromDigits[#, b] & /@ Tuples[{2, 3, 5, 7}, k], PrimeQ]], {k, 1, dignum}]; s]; seq[maxdig9_] := Select[Intersection[seq1[maxdig9, 9], seq1[maxdig9, 10]], # <= 9^maxdig9 &]; seq[11] (* Amiram Eldar, Jan 06 2024 *)
PROG
(Python)
from gmpy2 import digits, is_prime
from itertools import count, islice, product
def bgen():
yield from [2, 3, 5, 7]
for d in count(2):
for f in product("2357", repeat=d-1):
for last in "37":
yield int("".join(f)+last)
def agen(): yield from (t for t in bgen() if is_prime(t) and set(digits(t, 9)) <= set("2357"))
print(list(islice(agen(), 33))) # Michael S. Branicky, Jan 07 2024
CROSSREFS
Sequence in context: A343834 A070029 A360497 * A262339 A110094 A088054
KEYWORD
nonn,base
AUTHOR
James C. McMahon, Jan 06 2024
STATUS
approved

A366693 Contribution to the OEIS

 

A366693Minimal number of primorials or their negatives that add to n.2
0, 1, 1, 2, 2, 2, 1, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 2, 3, 3, 3, 2, 2, 1, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 4, 3, 4, 4, 5, 5, 5, 4, 5, 5, 5, 4, 4, 3, 4, 4, 4, 3, 3, 2, 3, 3, 4, 4, 4, 3, 4, 4, 5, 5, 5, 4, 5, 5, 6, 6, 6, 5, 6, 6, 6, 5, 5, 4, 5, 5, 5 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
0,4
LINKS
EXAMPLE
5 = 6 - 1 (two primorials), so a(5) = 2.
27 = 30 - 2 - 1 (three primorials), so a(27) = 3.
MATHEMATICA
a[nthPrimorials_Integer?NonNegative (* Increase nthPrimorials to use more positive and negative primorials in sum *), numberOfPrimorials_Integer?NonNegative (* Increase numberOfPrimorials to increase cap of minimal number of primorials *)] := a[nthPrimorials, numberOfPrimorials] = Module[{A002110, f, h, s}, A002110[nthPrimorials] = Join[{1}, Denominator[Accumulate[1/Prime[Range[nthPrimorials]]]]]; A002110[n_] := A002110[n] = Join[{1}, Denominator[Accumulate[1/Prime[Range[n]]]]]; f[n_] := f[n] = Flatten[Table[p*r, {p, A002110[n - 1]}, {r, {1, -1}}]]; h[n_, u_] := h[n, u] = Sort[Select[DeleteDuplicates[Flatten[Table[Sum[p[j], {j, 1, u}], ##] & @@ Table[{p[j], f[n]}, {j, 1, u}]]], # > 0 &]]; s = Table[Infinity, {A002110[nthPrimorials][[-1]]}]; Monitor[Do[If[s[[k]] > k, s[[k]] = l], {l, 1, numberOfPrimorials}, {k, h[nthPrimorials, l]}], {l, k}]; s = Join[{0}, s]; If[MemberQ[s, Infinity], s[[1 ;; Position[s, Infinity][[1, 1]] - 1]], s]]; a[6, 6] (* Robert P. P. McKone, Oct 21 2023 *)
CROSSREFS
Sequence in context: A261915 A109037 A366136 * A147680 A192895 A210685
KEYWORD
nonn,look
AUTHOR
James C. McMahon, Oct 16 2023
STATUS
approved

A366136 Contribution to the OEIS

 

A366136Minimal number of factorials or their negatives that add to n.2
0, 1, 1, 2, 2, 2, 1, 2, 2, 3, 3, 3, 2, 3, 3, 4, 3, 3, 2, 3, 3, 3, 2, 2, 1, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 4, 3, 4, 4, 5, 4, 4, 3, 4, 4, 4, 3, 3, 2, 3, 3, 4, 4, 4, 3, 4, 4, 5, 5, 5, 4, 5, 5, 6, 5, 5, 4, 5, 5, 5, 4, 4, 3, 4, 4, 5, 5, 5, 4, 5, 5, 6, 5, 5, 4, 5, 5 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
0,4
LINKS
EXAMPLE
11 = 6 + 6 - 1 (three factorials), so a(11) = 3.
15 = 6 + 6 + 2 + 1 or 15 = 24 - 6 - 2 - 1 (four factorials), so a(15) = 4.
MATHEMATICA
seq[m_] := Module[{s = Table[m!, {m!}], d, b, sum}, Do[d = PadLeft[Most@ IntegerDigits[k, MixedRadix[Range[m, 1, -1]]], m]; Do[b = 2*PadLeft[ IntegerDigits[i, 2], m] - 1; sum = Total[b * d * Range[m, 1, -1]!]; If[0 < sum <= m!, s[[sum]] = Min[s[[sum]], Total[d]]], {i, 1, 2^m - 1}], {k, 1, 2*m!}]; Join[{0}, s]]; seq[5] (* Amiram Eldar, Oct 03 2023 *)
CROSSREFS
Sequence in context: A204018 A261915 A109037 * A366693 A147680 A192895
KEYWORD
nonn,look
AUTHOR
James C. McMahon, Sep 30 2023
STATUS
approved

A365472 Contribution to the OEIS

 

A365472Numbers whose digits are either all primes or all nonprimes.1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 16, 18, 19, 22, 23, 25, 27, 32, 33, 35, 37, 40, 41, 44, 46, 48, 49, 52, 53, 55, 57, 60, 61, 64, 66, 68, 69, 72, 73, 75, 77, 80, 81, 84, 86, 88, 89, 90, 91, 94, 96, 98, 99, 100, 101, 104, 106, 108, 109, 110, 111, 114 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,3
COMMENTS
Complement of A365589.
Union of A046034 and A084984.
LINKS
MATHEMATICA
a[n_Integer?NonNegative] := Select[Range[0, n], Module[{digits, primeDigits}, digits = IntegerDigits[#]; primeDigits = MemberQ[{2, 3, 5, 7}, #] & /@ digits; AllTrue[primeDigits, Identity] || AllTrue[primeDigits, Not]] &]; a[114] (* Robert P. P. McKone, Sep 13 2023 *)
CROSSREFS
Sequence in context: A252494 A030294 A125668 * A034894 A263564 A061430
KEYWORD
nonn,base
AUTHOR
James C. McMahon, Sep 11 2023
STATUS
approved

A365471 Contribution to the OEIS

 

A365471Numbers whose digits are not all primes.1
0, 1, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 26, 28, 29, 30, 31, 34, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 74, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,3
COMMENTS
Complement of A046034.
Union of A084984 and A365589.
LINKS
MATHEMATICA
a[n_Integer?NonNegative] := Select[Range[0, n], Not[AllTrue[MemberQ[{2, 3, 5, 7}, #] & /@ IntegerDigits@#, Identity]] &]; a[86] (* Robert P. P. McKone, Sep 13 2023 *)
Select[Range[0, 100], AnyTrue[IntegerDigits[#], !PrimeQ[#]&]&] (* Harvey P. Dale, Dec 22 2023 *)
CROSSREFS
Sequence in context: A225668 A091985 A091984 * A228651 A045762 A320985
KEYWORD
base,nonn
AUTHOR
James C. McMahon, Sep 11 2023
STATUS
approved

A365589 Contribution to the OEIS

 

A365589Numbers that have at least one prime digit and at least one nonprime digit.2
12, 13, 15, 17, 20, 21, 24, 26, 28, 29, 30, 31, 34, 36, 38, 39, 42, 43, 45, 47, 50, 51, 54, 56, 58, 59, 62, 63, 65, 67, 70, 71, 74, 76, 78, 79, 82, 83, 85, 87, 92, 93, 95, 97, 102, 103, 105, 107, 112, 113, 115, 117, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,1
COMMENTS
The first 44 terms coincide with A085556 (Number of prime digits = number of nonprime digits). a(45) = 102; A085556(45) = 1022.
LINKS
MATHEMATICA
Select[Range[132], ContainsAny[IntegerDigits[#], {2, 3, 5, 7}] && ContainsAny[IntegerDigits[#], {0, 1, 4, 6, 8, 9}]&] (* James C. McMahon, Oct 08 2023 *)
CROSSREFS
Cf. A085556, A118950, A365472 (complement).
Sequence in context: A096514 A074163 A076979 * A085520 A085556 A175225
KEYWORD
nonn,base
AUTHOR
James C. McMahon, Sep 10 2023
STATUS
approved

A364831 Contribution to the OEIS

 

A364831Primes whose digits are prime and in nonincreasing order.1
2, 3, 5, 7, 53, 73, 733, 773, 5333, 7333, 7753, 55333, 75533, 75553, 77773, 733333, 755333, 775553, 7553333, 7555333, 7775533, 7777753, 55555333, 55555553, 77755553, 555553333, 755555533, 773333333, 777555553, 777773333, 777775333, 777775553, 777777773 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,1
COMMENTS
Intersection of A028867 and A019546.
The subsequence for primes whose digits are prime and in strictly decreasing order has just six terms: 2 3 5 7 53 73 (see A177061).
LINKS
MATHEMATICA
Select[Prime[Range[3100000]], AllTrue[d = IntegerDigits[#], PrimeQ] && GreaterEqual @@ d &]
PROG
(Python)
from itertools import count, islice, chain, combinations_with_replacement
from sympy import isprime
def A364831_gen(): # generator of terms
yield 2
yield from chain.from_iterable((sorted(s for d in combinations_with_replacement('753', l) if isprime(s:=int(''.join(d)))) for l in count(1)))
A364831_list = list(islice(A364831_gen(), 30)) # Chai Wah Wu, Sep 10 2023
CROSSREFS
Sequence in context: A214179 A178237 A118842 * A244595 A244597 A237439
KEYWORD
nonn,base
AUTHOR
James C. McMahon, Aug 09 2023
STATUS
approved

A362678 Contribution to the OEIS

 

A362678Primes whose digits are prime and in nondecreasing order.1
2, 3, 5, 7, 23, 37, 223, 227, 233, 257, 277, 337, 557, 577, 2237, 2333, 2357, 2377, 2557, 2777, 3557, 5557, 22277, 22777, 23333, 23357, 23557, 25577, 33377, 33577, 222337, 222557, 223337, 223577, 233357, 233557, 233777, 235577, 333337, 335557, 355777 (listgraphrefslistenhistoryedittextinternal format)
OFFSET
1,1
COMMENTS
Intersection of A009994 and A019546.
The subsequence for primes whose digits are prime and in strictly increasing order has just eight terms: 2 3 5 7 23 37 257 2357 (see A177061).
LINKS
MAPLE
M:= 7: # for terms with <+ M digits
R:= NULL:
for d from 1 to M do
S:= NULL:
for x2 from 0 to d do
for x3 from 0 to d-x2 do
for x5 from 0 to d-x2-x3 do
x7:= d-x2-x3-x5;
x:= parse(cat(2$x2, 3$x3, 5$x5, 7$x7));
if isprime(x) then S:= S, x fi;
od od od;
R:= R, op(sort([S]));
od:
R; # Robert Israel, Jul 04 2023
MATHEMATICA
Select[Prime[Range[31000]], AllTrue[d = IntegerDigits[#], PrimeQ] && LessEqual @@ d &] (* Amiram Eldar, Jul 07 2023 *)
PROG
(Python)
from sympy import isprime
from itertools import count, combinations_with_replacement as cwr, islice
def agen(): yield from (filter(isprime, (int("".join(c)) for d in count(1) for c in cwr("2357", d))))
print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 05 2023
(PARI) isok(p) = if (isprime(p), my(d=digits(p)); (d == vecsort(d)) && (#select(isprime, d) == #d)); \\ Michel Marcus, Jul 07 2023
CROSSREFS
Sequence in context: A100552 A210566 A155873 * A106711 A235110 A048398
KEYWORD
nonn,base
AUTHOR
James C. McMahon, Jul 03 2023
STATUS
approved

An Open Message to the Blog's Fans in Singapore

(Image:  Free 12 singapore icons - Iconfinder ) This past week, more views of this blog were made from Singapore than other country. To ackn...

Popular in last 30 days