cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236510 Numbers whose prime factorization viewed as a tuple of powers is palindromic, when viewed from the least to the largest prime present, including also any zero-exponents for the intermediate primes.

This page as a plain text file.
%I A236510 #20 May 22 2025 10:21:36
%S A236510 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,19,21,22,23,25,26,27,29,30,31,
%T A236510 32,33,34,35,36,37,38,39,41,43,46,47,49,51,53,55,57,58,59,61,62,64,65,
%U A236510 67,69,71,73,74,77,79,81,82,83,85,86,87,89,90,91,93,94,95
%N A236510 Numbers whose prime factorization viewed as a tuple of powers is palindromic, when viewed from the least to the largest prime present, including also any zero-exponents for the intermediate primes.
%C A236510 Compute the prime factorization of n = product(p_i^r_i). If the tuple (r_1,...) is a palindrome (excluding leading or trailing zeros, but including any possible intermediate zeros), n belongs to the sequence.
%C A236510 42 is the first element of A242414 not in this sequence, as 42 = 2^1 * 3^1 * 5^0 * 7^1, and (1,1,0,1) is not a palindrome, although (1,1,1) is.
%e A236510 14 is a member as 14 = 2^1 * 3^0 * 5^0 * 7^1, and (1,0,0,1) is a palindrome.
%e A236510 42 is not a member as 42 = 2^1 * 3^1 * 5^0 * 7^1, and (1,1,0,1) is not a palindrome.
%o A236510 (Python)
%o A236510 import re
%o A236510    
%o A236510 def factorize(n):
%o A236510    for prime in primes:
%o A236510       power = 0
%o A236510       while n%prime==0:
%o A236510          n /= prime
%o A236510          power += 1
%o A236510       yield power
%o A236510    
%o A236510 re_zeros = re.compile('(?P<zeros>0*)(?P<middle>.*[^0])(?P=zeros)')
%o A236510    
%o A236510 is_palindrome = lambda s: s==s[::-1]
%o A236510    
%o A236510 def has_palindromic_factorization(n):
%o A236510    if n==1:
%o A236510       return True
%o A236510    s = ''.join(str(x) for x in factorize(n))
%o A236510    try:
%o A236510       middle = re_zeros.match(s).group('middle')
%o A236510       if is_palindrome(middle):
%o A236510          return True
%o A236510    except AttributeError:
%o A236510       return False
%o A236510    
%o A236510 a = has_palindromic_factorization
%Y A236510 A subsequence of A242414.
%Y A236510 Cf. also A242418, A085924.
%K A236510 nonn,easy
%O A236510 1,2
%A A236510 _Christian Perfect_, Jan 27 2014