login
Numbers such that the list of exponents of their factorization is a palindromic list of primes.
0

%I #25 Jan 27 2019 09:02:09

%S 2700,5292,9000,13068,18252,24300,24500,24696,31212,38988,47628,55125,

%T 57132,60500,68600,84500,90828,95832,103788,117612,136125,144500,

%U 147852,158184,164268,166012,180500,181548,190125,199692,218700,231525,231868,238572,243000,264500,266200,280908,303372,325125

%N Numbers such that the list of exponents of their factorization is a palindromic list of primes.

%C I mean nontrivial palindrome: more than one number and not all equal numbers.

%C Factorization is meant to produce p1^e1*...*pk^ek, with pi in increasing order.

%e 9000 is a term as 9000=2^3*3^2*5^3 and the correspondent exponents list [3,2,3] is a palindromic list of primes.

%t aQ[s_] := Length[Union[s]]>1 && AllTrue[s, PrimeQ] && PalindromeQ[s]; Select[Range[1000], aQ[FactorInteger[#][[;;,2]]] &] (* _Amiram Eldar_, Dec 14 2018 *)

%o (Python)

%o from sympy.ntheory import factorint,isprime

%o def all_prime(l):

%o for i in l:

%o if not(isprime(i)): return(False)

%o return(True)

%o def all_equal(l):

%o ll=len(l)

%o set_l=set(l)

%o lsl=list(set_l)

%o llsl=len(lsl)

%o return(llsl==1)

%o def pal(l):

%o return(l == l[::-1])

%o n=350000

%o r=""

%o lp=[]

%o lexp=[]

%o def calc(n):

%o global lp,lexp

%o a=factorint(n)

%o lp=[]

%o for p in a.keys():

%o lp.append(p)

%o lexp=[]

%o for exp in a.values():

%o lexp.append(exp)

%o return

%o for i in range(4,n):

%o calc(i)

%o if len(lexp)>1:

%o if all_prime(lexp):

%o if not(all_equal(lexp)):

%o if pal(lexp):

%o r += ","+str(i)

%o print(r[1:])

%o (PARI) isok(n) = (ve=factor(n)[,2]~) && (Vecrev(ve)==ve) && (#ve>1) && (#Set(ve)>1) && (#select(x->(!isprime(x)), ve) == 0); \\ _Michel Marcus_, Dec 14 2018

%Y Subsequence of A242414.

%K nonn

%O 1,1

%A _Pierandrea Formusa_, Dec 13 2018