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.

Showing 1-5 of 5 results.

A242414 Numbers whose prime factorization viewed as a tuple of nonzero powers is palindromic.

Original entry on oeis.org

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, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 100
Offset: 1

Views

Author

Antti Karttunen, May 30 2014

Keywords

Comments

The fixed points of permutation A069799.
Differs from its subsequence, A072774, Powers of squarefree numbers, for the first time at n=68, as here a(68) = 90 is included, as 90 = p_1^1 * p_2^2 * p_3^1 has a palindromic tuple of exponents, even although not all of them are identical.
Differs from its another subsequence, A236510, in that, although numbers like 42 = 2^1 * 3^1 * 5^0 * 7^1, with a non-palindromic exponent-tuple (1,1,0,1) are excluded from A236510, it is included in this sequence, because here only the nonzero exponents are considered, and (1,1,1) is a palindrome.
Differs from A085924 in that as that sequence is subtly base-dependent, it excludes 1024 (= 2^10), as then the only exponent present, 10, and thus also its concatenation, "10", is not a palindrome when viewed in decimal base. On the contrary, here a(691) = 1024.

Examples

			As 1 has an empty factorization, (), which also is a palindrome, 1 is present.
As 42 = 2 * 3 * 7 = p_1^1 * p_2^1 * p_4^1, and (1,1,1) is palindrome, 42 is present.
As 90 = 2 * 9 * 5 = p_1^1 * p_2^2 * p_3^1, and (1,2,1) is palindrome, 90 is present.
Any prime power (A000961) is present, as such numbers have a factorization p^e (e >= 1), and any singleton sequence (e) by itself forms a palindrome.
		

Crossrefs

Fixed points of A069799.
Complement: A242416.
A000961, A072774 and A236510 are subsequences.

Programs

  • Mathematica
    Select[Range[100], PalindromeQ[FactorInteger[#][[All, 2]]]&] (* Jean-François Alcover, Feb 09 2025 *)

A069799 The number obtained by reversing the sequence of nonzero exponents in the prime factorization of n with respect to distinct primes present, as ordered by their indices.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18, 13, 14, 15, 16, 17, 12, 19, 50, 21, 22, 23, 54, 25, 26, 27, 98, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 250, 41, 42, 43, 242, 75, 46, 47, 162, 49, 20, 51, 338, 53, 24, 55, 686, 57, 58, 59, 150, 61, 62, 147, 64, 65
Offset: 1

Views

Author

Amarnath Murthy, Apr 13 2002

Keywords

Comments

Equivalent description nearer to the old name: a(n) is a number obtained by reversing the indices of the primes present in the prime factorization of n, from the smallest to the largest, while keeping the nonzero exponents of those same primes at their old positions.
This self-inverse permutation of natural numbers fixes the numbers in whose prime factorization the sequence of nonzero exponents form a palindrome: A242414.
Integers which are changed are A242416.
Considered as a function on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements an operation which reverses the order of vertical line segments of the "steps" in Young (or Ferrers) diagram of a partition, but keeps the order of horizontal line segments intact. Please see the last example in the example section.

Examples

			a(24) = 54 as 24 = p_1^3 * p_2^1 = 2^3 * 3^1 and 54 = p_1^1 * p_2^3 = 2 * 3^3.
For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
Reversing the order of vertical line segment lengths (3,2,1)  to (1,2,3), but keeping the order of horizontal line segment lengths as (1,2,2), we get a new Young diagram
   _
  | |_ _
  |     |
  |     |_ _
  |         |
  |         |
  |_ _ _ _ _|
which represents the partition (1,3,3,5,5,5), encoded in A112798 by p_1 * p_3^2 * p_5^3 = 2 * 5^2 * 11^3 = 66550, thus a(2200) = 66550.
		

Crossrefs

A242414 gives the fixed points and A242416 is their complement.
{A000027, A069799, A242415, A242419} form a 4-group.
The set of permutations {A069799, A105119, A225891} generates an infinite dihedral group.

Programs

  • Haskell
    a069799 n = product $
                zipWith (^) (a027748_row n) (reverse $ a124010_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A069799 n) (let ((pf (ifactor n))) (apply * (map expt (uniq pf) (reverse (multiplicities pf))))))
    (define (ifactor n) (cond ((< n 2) (list)) (else (sort (factor n) <))))
    (define (uniq lista) (let loop ((lista lista) (z (list))) (cond ((null? lista) (reverse! z)) ((and (pair? z) (equal? (car z) (car lista))) (loop (cdr lista) z)) (else (loop (cdr lista) (cons (car lista) z))))))
    (define (multiplicities lista) (let loop ((mults (list)) (lista lista) (prev #f)) (cond ((not (pair? lista)) (reverse! mults)) ((equal? (car lista) prev) (set-car! mults (+ 1 (car mults))) (loop mults (cdr lista) prev)) (else (loop (cons 1 mults) (cdr lista) (car lista))))))
    ;; Antti Karttunen, May 24 2014
    
  • Maple
    A069799 := proc(n) local e,j; e := ifactors(n)[2]:
    mul (e[j][1]^e[nops(e)-j+1][2], j=1..nops(e)) end:
    seq (A069799(i), i=1..40);
    # Peter Luschny, Jan 17 2011
  • Mathematica
    f[n_] := Block[{a = Transpose[ FactorInteger[n]], m = n}, If[ Length[a] == 2, Apply[ Times, a[[1]]^Reverse[a[[2]] ]], m]]; Table[ f[n], {n, 1, 65}]
  • PARI
    a(n) = {my(f = factor(n)); my(g = f); my(nbf = #f~); for (i=1, nbf, g[i, 1] = f[nbf-i+1, 1];); factorback(g);} \\ Michel Marcus, Jul 02 2015

Formula

If n = p_a^e_a * p_b^e_b * ... * p_j^e_j * p_k^e_k, where p_a < ... < p_k are distinct primes of the prime factorization of n (sorted into ascending order), and e_a, ..., e_k are their nonzero exponents, then a(n) = p_a^e_k * p_b^e_j * ... * p_j^e_b * p_k^e_a.
a(n) = product(A027748(o(n)+1-k)^A124010(k): k=1..o(n)) = product(A027748(k)^A124010(o(n)+1-k): k=1..o(n)), where o(n) = A001221(n). - Reinhard Zumkeller, Apr 27 2013
From Antti Karttunen, Jun 01 2014: (Start)
Can be obtained also by composing/conjugating related permutations:
a(n) = A242415(A242419(n)) = A242419(A242415(n)).
(End)

Extensions

Edited, corrected and extended by Robert G. Wilson v and Vladeta Jovovic, Apr 15 2002
Definition corrected by Reinhard Zumkeller, Apr 27 2013
Definition again reworded, Comments section edited and Young diagram examples added by Antti Karttunen, May 30 2014

A241912 Fixed points of A241916.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 15, 16, 17, 18, 19, 23, 29, 31, 32, 37, 41, 43, 45, 47, 50, 53, 55, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 98, 101, 103, 105, 107, 108, 109, 113, 119, 127, 128, 131, 135, 137, 139, 149, 150, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199
Offset: 1

Views

Author

Antti Karttunen, May 03 2014

Keywords

Comments

A natural number n occurs here if and only if it is either a power of 2, or satisfies A001511(n) = A071178(n) [the exponent of highest power of 2 dividing n is one less than the exponent of the largest prime factor of n], and all the intermediate exponents form a palindrome. [Please see the definition of A241916.]
Numbers for which the corresponding rows in A112798 and A241918 are the conjugate partitions of each other.

Examples

			98 = 2*7*7 = p_1^1 * p_2^0 * p_3^0 * p_4^2 is included because 2 occurs once, the highest prime factor 7 occurs twice (thus A001511(150) = A071178(150) = 2), and the intermediate exponents (in this case {0,0}) form a palindrome.
150 = 2*3*5*5 = p_1^1 * p_2^1 * p_3^2 is included because 2 occurs once, the highest prime factor 5 occurs twice (thus A001511(150) = A071178(150) = 2), and the intermediate exponents (in this case 1) form a palindrome.
		

Crossrefs

Complement: A241913.
A079704 is a subsequence.

Programs

  • Mathematica
    f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Table[#[[n + 1]]/2, {n, Length@ # - 1}] &@ Select[Range@ 400, g@ f@ # == g@ Reverse@ f@ # &] (* Michael De Vlieger, Aug 27 2016 *)

Formula

a(n) = A242418(n+1)/2.

A137502 Reverse sequence of powers in prime decomposition of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 10, 2, 18, 2, 14, 6, 16, 2, 12, 2, 50, 10, 22, 2, 54, 4, 26, 8, 98, 2, 30, 2, 32, 14, 34, 6, 36, 2, 38, 22, 250, 2, 70, 2, 242, 18, 46, 2, 162, 4, 20, 26, 338, 2, 24, 10, 686, 34, 58, 2, 150, 2, 62, 50, 64, 14, 154, 2, 578, 38, 42, 2, 108, 2, 74, 12, 722, 6, 286
Offset: 1

Views

Author

Philippe Lallouet (philip.lallouet(AT)orange.fr), Apr 22 2008

Keywords

Comments

The term a(1) = 1 added on the grounds that as 1 has an empty prime factorization, it stays same when reversed. - Antti Karttunen, May 20 2014
In the prime decomposition of n we use all the primes up to the highest prime divisor, exponents of zero being allowed except for the largest prime.
If n = (p(1)^e1)*(p(2)^e2)*.......*(p(k)^ek) (ek>0, other ei>=0 and p(n) = n-th prime) then we reverse the sequence e1, e2 , ..., ek to build a(n): a(n) = (p(1)^ek)*(p(2)^e(k-1))* . . . . *(p(k)^e1)
As p(1)=2 and ek is never zero for n>1, a(n) is always even for n>1.
If n is prime then a(n) = 2 and if n is a power of prime, a(n) is the same power of 2.
(That is, a(A000961(n)) = A000079(A025474(n)) for all n.) - Antti Karttunen, May 20 2014.
If the sequence e1, e2, ..., ek is palindromic, a(n)=n. (A242418 gives such n).
For any given even number Q, we can by reversing the sequence of its powers define not only one but an infinity (by adding as many zeros as we want on the left end) of n such that a(n) = Q. Hence the sequence is a permutation of even integers where each even integer is infinitely repeated.
For example as Q = 1224 = (2^3)*(3^2)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1),
Q = a((2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^2)*(17^3)) = a(1660594) but also of an infinity of other ones, the first one being a((2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^2)*(19^1)) = a(5946753).
Please see A241916 for a variant which results an ordinary permutation of all natural numbers. - Antti Karttunen, May 20 2014

Examples

			As 9 = (2^0)*(3^2), hence a(9) = (2^2)*(3^0) = 4.
As 50 = (2^1)*(3^0)*(5^2), hence a(50) = (2^2)*(3^0)*(5^1) = 2*2*5 = 20.
As 57 = (2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^0)*(19^1), hence a(57) = (2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1)*(19^0) = 2*17 = 34.
		

Crossrefs

A242418 gives the fixed points.

Programs

  • Mathematica
    f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Table[g@ Reverse@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 27 2016 *)
  • Scheme
    (define (A137502 n) (if (< n 2) n (/ (* 2 (A241916 n)) (A006530 n)))) ;; Antti Karttunen, May 20 2014

Formula

a(1) = 1, and for n>1, a(n) = 2*A241916(n) / A006530(n). - Antti Karttunen, May 20 2014

Extensions

Edited by N. J. A. Sloane, Jan 16 2009.
Term a(1)=1 prepended, and erroneous terms (first at n=50) corrected, Antti Karttunen, May 20 2014

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.

Original entry on oeis.org

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, 32, 33, 34, 35, 36, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 67, 69, 71, 73, 74, 77, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95
Offset: 1

Views

Author

Christian Perfect, Jan 27 2014

Keywords

Comments

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.
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.

Examples

			14 is a member as 14 = 2^1 * 3^0 * 5^0 * 7^1, and (1,0,0,1) is a palindrome.
42 is not a member as 42 = 2^1 * 3^1 * 5^0 * 7^1, and (1,1,0,1) is not a palindrome.
		

Crossrefs

A subsequence of A242414.
Cf. also A242418, A085924.

Programs

  • Python
    import re
       
    def factorize(n):
       for prime in primes:
          power = 0
          while n%prime==0:
             n /= prime
             power += 1
          yield power
       
    re_zeros = re.compile('(?P0*)(?P.*[^0])(?P=zeros)')
       
    is_palindrome = lambda s: s==s[::-1]
       
    def has_palindromic_factorization(n):
       if n==1:
          return True
       s = ''.join(str(x) for x in factorize(n))
       try:
          middle = re_zeros.match(s).group('middle')
          if is_palindrome(middle):
             return True
       except AttributeError:
          return False
       
    a = has_palindromic_factorization
Showing 1-5 of 5 results.