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-8 of 8 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

A161600 Nonprime numbers such that TITO(n) = n, where TITO(n) = A161594(n).

Original entry on oeis.org

1, 4, 6, 8, 9, 22, 26, 33, 39, 44, 46, 55, 62, 66, 69, 77, 82, 86, 88, 93, 99, 121, 143, 169, 187, 202, 206, 226, 242, 252, 253, 262, 286, 299, 303, 309, 339, 341, 343, 363, 393, 404, 422, 446, 451, 466, 473, 482, 484, 505, 525, 583, 606, 616, 622, 626, 633, 662, 669, 671, 682, 686
Offset: 1

Views

Author

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

Keywords

Crossrefs

Cf. A010051, A161594; subsequence of A161597.

Programs

  • Haskell
    a161600 n = a161600_list !! (n-1)
    a161600_list = filter ((== 0) . a010051) a161597_list
    -- 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[600], f[#] == # && ! PrimeQ[#] &]
  • PARI
    is(n)=!isprime(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
Minor edits and more displayed terms from M. F. Hasler, May 11 2015

A161598 Numbers such that TITO(n) is not equal to n, where TITO(n) = A161594(n).

Original entry on oeis.org

10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 34, 35, 36, 38, 40, 42, 45, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 63, 64, 65, 68, 70, 72, 74, 75, 76, 78, 80, 81, 84, 85, 87, 90, 91, 92, 94, 95, 96, 98, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116
Offset: 1

Views

Author

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

Keywords

Comments

There are no prime numbers in the sequence: A010051(a(n)) = 0.

Crossrefs

Complement of A161597.

Programs

  • Haskell
    a161598 n = a161598_list !! (n-1)
    a161598_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[ # ] != # &]

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

A161721 Primes p such that the reversal of p is prime and the product of p with its reversal is a palindrome.

Original entry on oeis.org

2, 3, 11, 101, 1021, 1201, 111211, 112111, 1000211, 1010201, 1020101, 1101211, 1102111, 1111021, 1112011, 1120001, 1121011, 1201111, 10011101, 10012001, 10021001, 10100201, 10111001, 10200101, 11012011, 11021011, 11100121, 12100111
Offset: 1

Views

Author

Tanya Khovanova, Jun 17 2009

Keywords

Comments

This sequence is a subsequence of A062936. If you multiply a member of this sequence by its reversal you get a number fixed under TITO algorithm (see A161594).
Conjecture: except for a(2) which equals 3, all terms can only be composed of the digits 0, 1 or 2. - Chai Wah Wu, Jan 07 2015
Conjecture: the digit 2 can only appear once in each term. - Robert G. Wilson v, Jan 07 2015
Number of terms less than 10^n: 2, 3, 4, 6, 6, 8, 18, 28, 37, 65, 97, 153, 230, 304, 414, 556, 756, 960, 1255, ... - Robert G. Wilson v, Jan 07 2015
A proper subset of A007500. - Robert G. Wilson v, Jan 07 2015

Examples

			1021 is a prime number, its reversal is 1201, which is also a prime. The product 1021*1201 = 1226221 is a palindrome.
		

Crossrefs

Programs

  • Maple
    rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: a := proc (n) local p: p := ithprime(n): if isprime(rev(p)) = true and rev(p*rev(p)) = p*rev(p) then p else end if end proc: seq(a(n), n = 1 .. 800000); # Emeric Deutsch, Jun 26 2009
  • Mathematica
    rev[n_]:=FromDigits[Reverse[IntegerDigits[n]]]; t={}; Do[p=Prime[n]; If[PrimeQ[q=rev[p]] && rev[p*q]==p*q, AppendTo[t,p]], {n,8*10^5}]; t (* Jayanta Basu, May 11 2013 *)
  • Python
    from sympy import isprime
    A161721_list = [2]
    for i in range(3,10**6,2):
        j = int(str(i)[::-1])
        if j == i:
            s = str(i**2)
            if s == s[::-1] and isprime(i):
                A161721_list.append(i)
        elif j > i:
            s = str(i*j)
            if s == s[::-1] and isprime(i) and isprime(j):
                A161721_list.extend([i,j])
    A161721_list = sorted(A161721_list) # Chai Wah Wu, Jan 07 2015

Extensions

Edited by N. J. A. Sloane, Jun 23 2009
More terms from Emeric Deutsch, Jun 26 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

A161957 Fixed points of A161955.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 27, 29, 31, 37, 41, 43, 45, 47, 51, 53, 59, 61, 63, 67, 71, 73, 79, 83, 85, 89, 93, 95, 97, 101, 103, 107, 109, 111, 113, 119, 123, 127, 131, 137, 139, 149, 151, 153, 157, 163, 167, 173, 179, 181, 187, 189, 191, 193, 197, 199
Offset: 1

Views

Author

Tanya Khovanova, Jun 22 2009

Keywords

Comments

Fixed points of the TITO2 operation (the TITO operation in binary): numbers a(n) such that A161955(a(n)) = a(n).
All numbers in the sequence are odd. All odd primes A065091 belong to the sequence.

Examples

			95 is in this sequence because 95 = 5*19. Prime factors in binary are: 101 and 10011.
Reversing them we get 101 and 11001. The product of the last two numbers is 1111101, which is
the reverse of the binary representation of 95 (1011111).
		

Crossrefs

Programs

  • Mathematica
    reverseBinPower[{n_, k_}] := FromDigits[Reverse[IntegerDigits[n, 2]], 2]^k fBin[n_] := FromDigits[ Reverse[IntegerDigits[ Times @@ Map[reverseBinPower, FactorInteger[n]], 2]], 2] Select[Range[300], fBin[ # ] == # &]

Extensions

Comments condensed by R. J. Mathar, Aug 14 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-8 of 8 results.