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.

A161594 a(n) = R(f(n)), where R = A004086 = reverse (decimal) digits, f = A071786 = reverse digits of prime factors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 13, 41, 51, 61, 17, 81, 19, 2, 12, 22, 23, 42, 52, 26, 72, 82, 29, 3, 31, 23, 33, 241, 53, 63, 37, 281, 39, 4, 41, 24, 43, 44, 54, 46, 47, 84, 94, 5, 312, 421, 53, 45, 55, 65, 372, 481, 59, 6, 61, 62, 36, 46, 551, 66, 67, 482, 69, 7, 71, 27
Offset: 1

Views

Author

J. H. Conway & Tanya Khovanova, Jun 14 2009

Keywords

Comments

Might be called TITO(n), turning n inside out then turning outside in.
Here is the operation: take a number n and find its prime factors. Reverse the digits of every prime factor (for example, replace 17 by 71). Multiply the factors respecting multiplicities. For example, if the original number was 17^2*43^3, the new product will be 71^2*34^3. After that, reverse the resulting number.

Examples

			a(34) = 241, because 34 = 2*17, f(34) = 2*71 = 142, and reversing gives 241.
		

Crossrefs

Programs

  • Haskell
    a161594 = a004086 . a071786  -- Reinhard Zumkeller, Oct 14 2011
    
  • Maple
    read("transforms") ; A071786 := proc(n) local ifs,a,d ; ifs := ifactors(n)[2] ; a := 1 ; for d in ifs do a := a*digrev(op(1,d))^op(2,d) ; od: a ; end: A161594 := proc(n) digrev(A071786(n)) ; end: seq(A161594(n),n=1..80) ; # R. J. Mathar, Jun 16 2009
    # second Maple program:
    r:= n-> (s-> parse(cat(seq(s[-i], i=1..length(s)))))(""||n):
    a:= n-> r(mul(r(i[1])^i[2], i=ifactors(n)[2])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 19 2017
  • Mathematica
    reversepower[{n_, k_}] := FromDigits[Reverse[IntegerDigits[n]]]^k f[n_] := FromDigits[ Reverse[IntegerDigits[Times @@ Map[reversepower, FactorInteger[n]]]]] Table[f[n], {n, 100}]
    Table[IntegerReverse[Times@@Flatten[Table[IntegerReverse[#[[1]]],#[[2]]]& /@FactorInteger[n]]],{n,100}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 21 2016 *)
  • PARI
    R=A004086; A161594(n)={n=factor(n);n[,1]=apply(R,n[,1]);R(factorback(n))} \\  M. F. Hasler, Jun 24 2009. Removed code for R here, see A004086 for most recent & efficient version. - M. F. Hasler, May 11 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def f(n): return prod(int(str(p)[::-1])**e for p, e in factorint(n).items())
    def R(n): return int(str(n)[::-1])
    def a(n): return 1 if n == 1 else R(f(n))
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Mar 28 2022

Formula

a(p) = p, for prime p.
a(A161598(n)) <> A161598(n); a(A161597(n)) = A161597(n); A010051(a(A161600(n))) = 1.
From M. F. Hasler, Jun 25 2009: (Start)
a( p*10^k ) = p for any prime p.
Proof: if gcd( p, 2*5) = 1, then a( p * 10^k ) = R( R(p) * R(2)^k * R(5)^k ) = R( R(p) * 10^k ) = R(R(p)) = p;
if gcd(p, 2*5) = 2, then p=2 and a( p * 10^k ) = R( R(2)^(k+1) * R(5)^k ) = R( 2 * 10^k ) = 2 = p and mutatis mutandis for gcd(p, 2*5) = 5. (End)

Extensions

Simpler definition from R. J. Mathar, Jun 16 2009
Edited by N. J. A. Sloane, Jun 23 2009

A161597 Numbers such that TITO(n) = n, where TITO(n) = A161594(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 17, 19, 22, 23, 26, 29, 31, 33, 37, 39, 41, 43, 44, 46, 47, 53, 55, 59, 61, 62, 66, 67, 69, 71, 73, 77, 79, 82, 83, 86, 88, 89, 93, 97, 99, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179
Offset: 1

Views

Author

J. H. Conway & Tanya Khovanova, Jun 14 2009

Keywords

Comments

TITO(p) = p, for any prime p.

Crossrefs

Complement of A161598; nonprimes: A161600.

Programs

  • Haskell
    a161597 n = a161597_list !! (n-1)
    a161597_list = filter (\x -> a161594 x == x) [1..]
    -- Reinhard Zumkeller, Oct 14 2011
    
  • Mathematica
    reversepower[{n_, k_}] := FromDigits[Reverse[IntegerDigits[n]]]^k f[n_] := FromDigits[ Reverse[IntegerDigits[Times @@ Map[reversepower, FactorInteger[n]]]]] Select[Range[200], f[ # ] == # &]
  • PARI
    is(n)={n==A161594(n)} \\ M. F. Hasler, May 11 2015

Extensions

Edited by N. J. A. Sloane, Jun 23 2009
Offset corrected by Reinhard Zumkeller, Oct 14 2011

A161730 Palindromic numbers that are fixed points of the TITO operation (see A161594) and are not products of palindromic primes.

Original entry on oeis.org

72927, 76167, 434434, 868868, 1226221, 4778774, 5703075, 8755578, 9386839, 13488431, 43877834, 123848321, 564414465, 777555777, 1072772701, 1946776491, 9935115399, 12467976421, 52854045825, 74663436647, 83361616338, 95829592859
Offset: 1

Views

Author

Tanya Khovanova, Jun 17 2009

Keywords

Comments

The numbers in this sequence are palindromic numbers that are fixed points of the TITO operation and are not primes and are not in A046351.

Crossrefs

Programs

  • Mathematica
    reversepower[{n_, k_}] := FromDigits[Reverse[IntegerDigits[n]]]^k f[n_] := FromDigits[ Reverse[IntegerDigits[Times @@ Map[reversepower, FactorInteger[n]]]]] rev[n_] := FromDigits[Reverse[IntegerDigits[n]]] Select[Range[5000000], rev[ # ] == # && ! PrimeQ[ # ] && f[ # ] == # && Map[rev, Transpose[FactorInteger[ # ]][[1]]] != Transpose[FactorInteger[ # ]][[1]] &]
  • PARI
    for( d=1,19, my(p=10^((d+1)\2),q=10^(d%2)); for( i=p\10,p-1, my(n = i\q*p+R(i),f); A161594(n)==n || next; apply(R,f=factor(n)[,1])==f && next; print1(n",") )) /* uses definitions given in A161594 */ \\ M. F. Hasler, Jun 25 2009

Extensions

Edited by N. J. A. Sloane, Jun 23 2009
Terms beyond a(6) from M. F. Hasler, Jun 25 2009

A161732 Fixed points of the TITO operation (A161594) that are also composite palindromes.

Original entry on oeis.org

4, 6, 8, 9, 22, 33, 44, 55, 66, 77, 88, 99, 121, 202, 242, 252, 262, 303, 343, 363, 393, 404, 484, 505, 525, 606, 616, 626, 686, 707, 808, 909, 939, 1111, 1331, 1441, 1661, 1991, 2112, 2222, 2662, 2772, 2882, 3333, 3443, 3773, 3883, 3993, 4224, 4444, 5445
Offset: 1

Views

Author

Tanya Khovanova, Jun 17 2009

Keywords

Comments

This sequence is a proper superset of A046351 (palindromic composite numbers with only palindromic prime factors). The smallest number that doesn't belong to A046351 is 72927. The numbers that are in this sequence and are not in A046351 are given in A161730.

Crossrefs

Programs

  • Mathematica
    reversepower[{n_, k_}] := FromDigits[Reverse[IntegerDigits[n]]]^k f[n_] := FromDigits[ Reverse[IntegerDigits[Times @@ Map[reversepower, FactorInteger[n]]]]] rev[n_] := FromDigits[Reverse[IntegerDigits[n]]] Select[Range[10000], f[ # ] == # && rev[ # ] == # && ! PrimeQ[ # ] &]

Extensions

Edited by N. J. A. Sloane, Jun 23 2009

A162151 Numbers n such that m=TITO(n)>n and TITO(m)=n, where TITO() = A161594().

Original entry on oeis.org

12, 18, 24, 27, 36, 45, 48, 132, 144, 156, 198, 264, 276, 288, 291, 297, 372, 375, 396, 405, 492, 495, 528, 576, 1089, 1212, 1236, 1287, 1356, 1359, 1452, 1572, 1584, 1629, 1683, 1728, 1812, 1818, 2002, 2067, 2079, 2178, 2304, 2424, 2532, 2676, 2721, 2727
Offset: 1

Views

Author

Zak Seidov, Jun 26 2009

Keywords

Comments

Or, numbers that end in two-cycles under TITO operation.

Examples

			For smaller n's, m is a reversal of n, but for larger n's, there are other cases as well:{12,21},{18,81},{24,42},{27,72},...,{291,732},...,{372,651}, etc.
		

Crossrefs

Formula

m=A161594(n)>n, and A161594(m)=n.
Showing 1-5 of 5 results.