[go: up one dir, main page]

login
Revision History for A362499 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the least positive integer that has exactly n anagrams that are semiprimes, or -1 if there is no such integer.
(history; published version)
#22 by OEIS Server at Wed Jun 14 10:34:53 EDT 2023
LINKS

Robert Israel, <a href="/A362499/b362499_1.txt">Table of n, a(n) for n = 0..1000</a>

#21 by N. J. A. Sloane at Wed Jun 14 10:34:53 EDT 2023
STATUS

proposed

approved

Discussion
Wed Jun 14
10:34
OEIS Server: Installed first b-file as b362499.txt.
#20 by Michael S. Branicky at Mon Jun 12 06:59:41 EDT 2023
STATUS

editing

proposed

#19 by Michael S. Branicky at Mon Jun 12 06:59:17 EDT 2023
PROG

(Python)

from sympy import factorint

from sympy.utilities.iterables import multiset_permutations as mp

from itertools import count, islice, combinations_with_replacement as mc

def ndgen():

yield from ((f, )+r for d in count(1) for f in "123456789" for r in mc("0123456789", d-1))

def c(n): # is_semiprime

return sum(factorint(n).values()) == 2

def f(digs):

return sum(1 for p in mp(digs) if p[0]!="0" and c(t:=int("".join(p))))

def agen(): # generator of terms

adict, n = dict(), 0

for t in ndgen():

v = f(t)

if v not in adict: adict[v] = int("".join(t))

while n in adict: yield adict[n]; n += 1

print(list(islice(agen(), 46))) # Michael S. Branicky, Jun 12 2023

STATUS

proposed

editing

Discussion
Mon Jun 12
06:59
Michael S. Branicky: just a program.  confirms entire b-file.
#18 by Robert Israel at Sun Jun 11 21:16:20 EDT 2023
STATUS

editing

proposed

#17 by Robert Israel at Sun Jun 11 21:16:06 EDT 2023
LINKS

Robert Israel, <a href="/A362499/b362499_1.txt">Table of n, a(n) for n = 0..1000</a>

KEYWORD

nonn,base,changed,look

#16 by Robert Israel at Sun Jun 11 17:32:41 EDT 2023
NAME

allocated for Robert Israela(n) is the least positive integer that has exactly n anagrams that are semiprimes, or -1 if there is no such integer.

DATA

1, 4, 15, 123, 129, 134, 178, 1025, 1148, 1147, 1137, 1145, 1349, 1348, 1357, 10145, 3589, 10258, 10137, 10123, 11269, 10289, 10268, 10247, 10235, 10267, 10234, 10789, 10279, 11378, 10378, 12369, 10349, 10358, 12368, 10357, 12689, 12358, 10459, 12379, 12679, 13489, 12346, 12349, 16789, 12479

OFFSET

0,2

COMMENTS

a(n) is the least k such that A131371(k) = n.

Leading zeros are not allowed.

EXAMPLE

a(3) = 123 because 123 has 3 anagrams that are semiprimes, namely 123 = 3 * 41, 213 = 3 * 71, and 321 = 3 * 107, and no smaller number works.

MAPLE

g:= proc(s, m) local t;

if s[1..m-1] = [0$(m-1)] then op(map(t -> [t, op(s)], [0, $(max(s) ..9)]))

else op(map(t -> [t, op(s)], [$(max(s) .. 9)]))

fi

end proc:

f:= proc(L, m) local P, t, i;

P:= select(t -> t[-1] <> 0 and numtheory:-bigomega(add(t[i]*10^(i-1), i=1..m))=2, combinat:-permute(L));

nops(P)

end proc:

V:= Array(0..100):

count:= 2: V[0]:= 1: V[1]:= 4:

L:= [seq(seq([b, a], b=[0, $a..9]), a=1..9)]:

for m from 2 while count < 101 do

for s in L while count < 101 do

v:= f(s, m);

if v <= 100 and V[v] = 0 then

V[v]:= add(s[i]*10^(i-1), i=1..m); count:= count+1;

fi

od;

L:= map(g, L, m)

od:

convert(V, list);

CROSSREFS
KEYWORD

allocated

nonn,base

AUTHOR

Robert Israel, Jun 11 2023

STATUS

approved

editing

#15 by Robert Israel at Sun Jun 11 17:32:41 EDT 2023
NAME

allocated for Robert Israel

KEYWORD

recycled

allocated

#14 by N. J. A. Sloane at Sun Jun 11 12:17:32 EDT 2023
STATUS

editing

approved

#13 by N. J. A. Sloane at Sun Jun 11 12:17:29 EDT 2023
NAME

a(n) is the maximum level of nesting of exponentiation required to write n in its prime exponent product form, with the exponents being written the same way, recursively.

DATA

1, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 2, 4, 2, 3, 2, 3, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 4, 3, 3, 2, 3, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 4, 4, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3

OFFSET

1,2

FORMULA

a(n) = 1 + max(a(e_i)), where n = 2^e_2 * 3^e_3 * 5^e_5 * 7^e_7 * ... * i^e_i, with i being a prime.

a(A005117(n)) = 2. - Jodi Spitz, Apr 22 2023

a(n) = A185102(n) + 1. - Pontus von Brömssen, Apr 22 2023

EXAMPLE

Take the height of the tallest power tower excluding the topmost 0:

For n = 1, 1 = 2^0 * 3^0 * 5^0 * 7^0 * ... * p_i^0, tallest power tower is p^0, so a(1) = 1.

For n = 2, 2 = 2^p^0, which is the tallest power tower for n = 2, so a(2) = 2.

For n = 12, 12 = 2^2 * 3^1 = 2^2^p^0 * 3^p^0, the tallest power tower is 2^2^p^0, so a(12) = 3.

For n = 16, 16 = 2^4 = 2^2^2 = 2^2^2^p^0, the tallest power tower is 2^2^2^p^0, so a(16) = 4.

p is an arbitrary prime in all of the examples.

CROSSREFS

Cf. A185102.

KEYWORD

nonn

recycled

AUTHOR

Daniyar Sarbasov, Apr 22 2023

STATUS

proposed

editing