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-10 of 15 results. Next

A066817 Conjectured values of first prime in the orbit f(m), f(f(m)), ..., where f(n) = A067599(n) and m = n-th composite number; or 0 if none exists.

Original entry on oeis.org

0, 2131, 23, 3224591, 0, 0, 241127117451117479045190960709721125675426733715695733779133596697360781090711425903130196316185995152974660668512820125356019549490226189398938302252287927928254649608061563193945459975102656949618158919173931, 0, 0, 0, 2251, 0, 0, 0, 3224591, 314313643123658229739531, 97211238048939739899395714118873644859466103898031, 0, 46747167851021731, 3224591, 97211238048939739899395714118873644859466103898031, 3141114911731, 5171
Offset: 1

Views

Author

Joseph L. Pe, Feb 01 2002

Keywords

Comments

The terms with 0 value listed above are conjectural. There are no primes < 10^30.
From Sean A. Irvine, Nov 09 2023: (Start)
None of the unresolved cases with n < 50 terminates in a prime < 10^130.
Because the trajectories under f can coalesce certain values are known to be equal even if that value is currently unknown. For example, a(1) = a(13) and a(9) = a(14).
Because of the inclusion of exponents 1 in the concatenation defined by f, terms in the trajectory typically grow quicker than in A195264 or A037274.
(End)

Crossrefs

Programs

  • Mathematica
    (* f returns an array encoding the prime factorization of n *) f[ n_] := Module[ {a, l, i, t = {} }, a = FactorInteger[ n]; l = Length[ a]; For[ i = 1, i <= l, i++, t = Append[ t, a[ [ i]][ [ 1]]]; t = Append[ t, a[ [ i]][ [ 2]]]]; t];
    (* g returns the concatenation of the elements of its input array *) g[ x_] := Module[ {r = "", m = Length[ x], l}, For[ l = 1, l <= m, l++, r = StringJoin[ r, ToString[ x[ [ l]]]]]; r];
    (* h returns an array of the digits of its input int string *) h[ n_] := IntegerDigits[ ToExpression[ n]]
    (* j returns the number formed from the digits in its input array *) j[ x_] := Module[ {r = 0, m = Length[ x], t = x, l}, For[ l = 1, l <= m, l++, r = 10*r + t[ [ 1]]; t = Rest[ t]]; r];
    (* k composes the previous functions *) k[ n_] := j[ h[ g[ f[ n]]]]
    s[ n_] := Module[ {a=n, r=0}, While[ !PrimeQ[ a] && a<10^30, a=k[ a]]; If[ PrimeQ[ a], r=a]; r]; Table[ s[ i], {i, 2, 50}]

Extensions

Offset changed to 1 by Jinyuan Wang, Jul 30 2020
a(7) and a(17) resolved and missing a(21) inserted by Sean A. Irvine, Nov 09 2023

A067254 Numbers k such that the decimal encoding of the prime factorization of k (A067599) ends in k.

Original entry on oeis.org

11, 8571, 11371, 190911, 12711811, 14713491, 19090911, 71119711, 12531135391, 15311195711, 112717566411, 158318548011, 518914376931, 7292811659931
Offset: 1

Views

Author

Joseph L. Pe, Feb 20 2002

Keywords

Comments

a(13) > 2*10^11. 518914376931, 7292811659931, 19090909090909090911 and prime repunits (A004022) are also terms. - Donovan Johnson, Dec 04 2012
Are there any terms not ending in 1? Equivalently, are any terms also in A070003? - Charles R Greathouse IV, Dec 05 2012
a(15) > 10^13. If exponents equal to 1 are not represented (as in A080670), the corresponding sequence starts with 113113, 31373137, and 533517177839 = 853 * 3517 * 177839. - Giovanni Resta, Jun 26 2017

Examples

			The prime factorization of 190911 is 3^1 * 7^1 * 9091^1 with decimal encoding 317190911, which ends in 190911. Hence 190911 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    (*returns true if a ends with b, false o.w.*) f[a_, b_] := Module[{c, d, e, g, h, i, r}, r = False; c = ToString[a]; d = ToString[b]; e = StringLength[c]; g = StringPosition[c, d]; h = Length[g]; If[h > 0, i = g[[h]]; If[i[[2]] == e, r = True]]; r]; (*gives the decimal encoding of the prime factorization of n*) g[n_] := FromDigits[Flatten[IntegerDigits[FactorInteger[n]]]]; Do[If[f[g[n], n], Print[n]], {n, 1, 10^6} ]
  • PARI
    {a067254(a,b) = local(n,v,k,j); for(n=max(2,a),b,v=factor(n); if(eval(concat(vector(matsize(v)[1],k, concat(vector(matsize(v)[2],j,Str(v[k,j]))))))%(10^length(Str(n)))==n,print1(n,",")))}
    a067254(2,2*10^7) \\ Klaus Brockhaus, Feb 22 2002

Extensions

a(5)-a(7) from Klaus Brockhaus, Feb 22 2002
a(8)-a(10) from Donovan Johnson, Mar 26 2010
a(11)-a(12) from Donovan Johnson, Dec 04 2012
a(13) from Giovanni Resta, Jun 09 2017
a(14) from Giovanni Resta, Jun 26 2017

A245270 Like A067599 but write everything in binary, then display the answer in base 10.

Original entry on oeis.org

5, 7, 10, 11, 47, 15, 11, 14, 91, 23, 87, 27, 95, 123, 20, 35, 94, 39, 171, 127, 183, 47, 95, 22, 187, 15, 175, 59, 763, 63, 21, 247, 355, 191, 174, 75, 359, 251, 187, 83, 767, 87, 343, 235, 367, 95, 167, 30, 182, 483, 347, 107, 95, 375, 191, 487, 379, 119
Offset: 2

Views

Author

Chai Wah Wu, Jul 15 2014

Keywords

Comments

The only fixed point < 10^8 is 470367 = 3^4 * 5807^1. - Christopher Scussel, Apr 28 2025

Examples

			24 = 2^3 * 3^1 has binary encoding 10_11_11_1, that is, 95 in decimal.
		

Crossrefs

Programs

  • PARI
    a(n) = {f = factor(n); s = []; for (i=1, #f~, s = concat(s, binary(f[i, 1])); s = concat(s, binary(f[i, 2]));); subst(Pol(s), x, 2);} \\ Michel Marcus, Jul 16 2014
  • Python
    import sympy
    [int(''.join([bin(y)[2:] for x in sorted(sympy.ntheory.factorint(n).items()) for y in x]),2) for n in range(2,200)] # compute a(n) for n > 1
    # Chai Wah Wu, Jul 15 2014
    

A066985 Reflective numbers: k such that the decimal encoding of the prime factorization of k (A067599) is palindromic.

Original entry on oeis.org

4, 11, 13, 17, 19, 27, 72, 199, 242, 529, 800, 841, 1151, 1171, 1181, 1303, 1352, 1373, 1469, 1747, 1777, 1787, 1922, 1949, 1979, 1999, 2321, 3125, 3362, 3421, 3887, 3993, 4069, 4096, 4232, 5389, 5766, 6272, 7442, 7961, 7969, 8921, 10021, 10082, 10469
Offset: 1

Views

Author

Joseph L. Pe, Feb 01 2002

Keywords

Examples

			The decimal encoding of the prime factorization 13^1 * 313^1 of 4069 is 1313131, which is palindromic. So 4069 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Flatten[IntegerDigits[FactorInteger[n]]]; Select[Range[2, 11000], f[ # ] == Reverse[f[ # ]] &]

Extensions

Edited by Robert G. Wilson v, Feb 08 2002
Offset corrected by Mohammed Yaseen, Jul 17 2023

A067671 The prime factors of n are also prime factors of the decimal encoding (A067599) of the prime factorization of n.

Original entry on oeis.org

4, 16, 21, 27, 36, 64, 256, 288, 648, 729, 1024, 1444, 1458, 1764, 1936, 2304, 3125, 4096, 4361, 5184, 6272, 7688, 8277, 9408, 11664, 16384, 18432, 19683, 22472, 22987, 26244, 28125, 29403, 31199, 41472, 43264, 59577, 65536, 67712, 73008
Offset: 1

Views

Author

Joseph L. Pe, Feb 04 2002

Keywords

Examples

			21 = 3^1 * 7^1 has prime factors 3,7, which are also prime factors of the corresponding decimal encoding 3171 = 3^1 * 7^1 * 151^1.
		

Crossrefs

Cf. A067599.

Programs

  • Mathematica
    (*f gives the decimal encoding of the prime factorization of n*) f[n_] := FromDigits[Flatten[IntegerDigits[FactorInteger[n]]]]; (*g gives the list of prime factors of n*) g[n_] := Module[{a, l, t}, a = FactorInteger[n]; l = Length[a]; Table[a[[i]][[1]], {i, 1, l}]];
    (*main routine*) j[n] := Module[{l1 = g[n], l2 = g[f[n]]}, (Intersection[l1, l2] == l1)]; Select[Range[2, 10^5], j[ # ] &]

A037276 Start with 1; for n>1, replace n with the concatenation of its prime factors in increasing order.

Original entry on oeis.org

1, 2, 3, 22, 5, 23, 7, 222, 33, 25, 11, 223, 13, 27, 35, 2222, 17, 233, 19, 225, 37, 211, 23, 2223, 55, 213, 333, 227, 29, 235, 31, 22222, 311, 217, 57, 2233, 37, 219, 313, 2225, 41, 237, 43, 2211, 335, 223, 47, 22223, 77, 255, 317, 2213, 53, 2333
Offset: 1

Views

Author

Keywords

Examples

			If n = 2^3*5^5*11^2 = 3025000, a(n) = 222555551111 (n=2*2*2*5*5*5*5*5*11*11, then remove the multiplication signs).
		

Crossrefs

Cf. A037274, A048985, A067599, A080670, A084796. Different from A073646.
Cf. also A027746, A289660 (a(n)-n).

Programs

  • Haskell
    a037276 = read . concatMap show . a027746_row
    -- Reinhard Zumkeller, Apr 03 2012
    
  • Maple
    # This is for n>1
    read("transforms") ;
    A037276 := proc(n)
        local L,p ;
        L := [] ;
        for p in ifactors(n)[2] do
            L := [op(L),seq(op(1,p),i=1..op(2,p))] ;
        end do:
        digcatL(L) ;
    end proc: # R. J. Mathar, Oct 29 2012
  • Mathematica
    co[n_, k_] := Nest[Flatten[IntegerDigits[{#, n}]] &, n, k - 1]; Table[FromDigits[Flatten[IntegerDigits[co @@@ FactorInteger[n]]]], {n, 54}] (* Jayanta Basu, Jul 04 2013 *)
    FromDigits@ Flatten@ IntegerDigits[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 54 (* Michael De Vlieger, Jul 14 2015 *)
  • PARI
    a(n)={ n<4 & return(n); for(i=1,#n=factor(n)~, n[1,i]=concat(vector(n[2,i],j,Str(n[1,i])))); eval(concat(n[1,]))}  \\ M. F. Hasler, Jun 19 2011
    
  • Python
    from sympy import factorint
    def a(n):
        f=factorint(n)
        l=sorted(f)
        return 1 if n==1 else int("".join(str(i)*f[i] for i in l))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017

A080670 Literal reading of the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 22, 5, 23, 7, 23, 32, 25, 11, 223, 13, 27, 35, 24, 17, 232, 19, 225, 37, 211, 23, 233, 52, 213, 33, 227, 29, 235, 31, 25, 311, 217, 57, 2232, 37, 219, 313, 235, 41, 237, 43, 2211, 325, 223, 47, 243, 72, 252, 317, 2213, 53, 233, 511, 237, 319, 229, 59, 2235
Offset: 1

Views

Author

Jon Perry, Mar 02 2003

Keywords

Comments

Exponents equal to 1 are omitted and therefore this sequence differs from A067599.
Here the first duplicate (ambiguous) term appears already with a(8)=23=a(6), in A067599 this happens only much later. - M. F. Hasler, Oct 18 2014
The number n = 13532385396179 = 13·53^2·3853·96179 = a(n) is (maybe the first?) nontrivial fixed point of this sequence, making it the first known index of a -1 in A195264. - M. F. Hasler, Jun 06 2017

Examples

			8=2^3, which reads 23, hence a(8)=23; 12=2^2*3, which reads 223, hence a(12)=223.
		

Crossrefs

See A195330, A195331 for those n for which a(n) is a contraction.
See also home primes, A037271.
See A195264 for what happens when k -> a(k) is repeatedly applied to n.
Partial sums: A287881, A287882.

Programs

  • Haskell
    import Data.Function (on)
    a080670 1 = 1
    a080670 n = read $ foldl1 (++) $
    zipWith (c `on` show) (a027748_row n) (a124010_row n) :: Integer
    where c ps es = if es == "1" then ps else ps ++ es
    -- Reinhard Zumkeller, Oct 27 2013
    
  • Maple
    ifsSorted := proc(n)
            local fs,L,p ;
            fs := sort(convert(numtheory[factorset](n),list)) ;
            L := [] ;
            for p in fs do
                    L := [op(L),[p,padic[ordp](n,p)]] ;
            end do;
            L ;
    end proc:
    A080670 := proc(n)
            local a,p ;
            if n = 1 then
                    return 1;
            end if;
            a := 0 ;
            for p in ifsSorted(n) do
                    a := digcat2(a,op(1,p)) ;
                    if op(2,p) > 1 then
                            a := digcat2(a,op(2,p)) ;
                    end if;
            end do:
            a ;
    end proc: # R. J. Mathar, Oct 02 2011
    # second Maple program:
    a:= proc(n) option remember; `if`(n=1, 1, (l->
          parse(cat(seq(`if`(l[i, 2]=1, l[i, 1], [l[i, 1],
          l[i, 2]][]), i=1..nops(l)))))(sort(ifactors(n)[2])))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 17 2020
  • Mathematica
    f[n_] := FromDigits[ Flatten@ IntegerDigits[ Flatten[ FactorInteger@ n /. {1 -> {}}]]]; f[1] = 1; Array[ f, 60] (* Robert G. Wilson v, Mar 02 2003 and modified Jul 22 2014 *)
  • PARI
    A080670(n)=if(n>1, my(f=factor(n),s=""); for(i=1,#f~,s=Str(s,f[i,1],if(f[i,2]>1, f[i,2],""))); eval(s),1) \\ Charles R Greathouse IV, Oct 27 2013; case n=1 added by M. F. Hasler, Oct 18 2014
    
  • PARI
    A080670(n)=if(n>1,eval(concat(apply(f->Str(f[1],if(f[2]>1,f[2],"")),Vec(factor(n)~)))),1) \\ M. F. Hasler, Oct 18 2014
    
  • Python
    import sympy
    [int(''.join([str(y) for x in sorted(sympy.ntheory.factorint(n).items()) for y in x if y != 1])) for n in range(2,100)] # compute a(n) for n > 1
    # Chai Wah Wu, Jul 15 2014

Extensions

Edited and extended by Robert G. Wilson v, Mar 02 2003

A230305 Iterate A080670 starting at n; a(n) = number of steps to reach a prime, or -1 if no prime is ever reached.

Original entry on oeis.org

0, 0, 2, 0, 1, 0, 1, 4, 3, 0, 1, 0, 3, 4, 2, 0, 3, 0
Offset: 2

Views

Author

N. J. A. Sloane, Oct 27 2013

Keywords

Comments

If n is a prime, a(n) = 0.
a(20) is presently unknown - see A195265 for the trajectory.

Examples

			9 -> 32 -> 25 -> 52 -> 2213, which is prime, taking 4 steps, so a(9) = 4.
		

Crossrefs

Cf. A080670, A195264 (the prime that is reached), A195265, A067599, A037271 (home primes).

Programs

  • Mathematica
    fn[n_] := FromDigits[Flatten[IntegerDigits[DeleteCases[Flatten[FactorInteger[n]], 1]]]];
    Map[Length, Table[NestWhileList[fn, n, # != 1 && ! PrimeQ[#] &], {n, 2,
    19}], {1}] - 1 (* Robert Price, Mar 16 2020 *)

A080695 Concatenation of the prime power factors (with maximal exponent) of n; a(1) = 1 by convention.

Original entry on oeis.org

1, 2, 3, 4, 5, 23, 7, 8, 9, 25, 11, 43, 13, 27, 35, 16, 17, 29, 19, 45, 37, 211, 23, 83, 25, 213, 27, 47, 29, 235, 31, 32, 311, 217, 57, 49, 37, 219, 313, 85, 41, 237, 43, 411, 95, 223, 47, 163, 49, 225, 317, 413, 53, 227, 511, 87, 319, 229, 59, 435, 61, 231, 97, 64
Offset: 1

Views

Author

Vladeta Jovovic, Mar 03 2003

Keywords

Comments

a(n) = n iff n is 1 or a prime power; otherwise, a(n) > n. - Ivan Neretin, May 31 2016

Examples

			a(67500) = a(2^2*3^3*5^4) = a(4*27*625) = 427625.
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits@Flatten@IntegerDigits[#[[1]]^#[[2]] & /@ FactorInteger[n]], {n, 64}] (* Ivan Neretin, May 31 2016 *)

Extensions

Edited by Charles R Greathouse IV, Apr 29 2010

A112375 Concatenation of base and exponent of prime powers.

Original entry on oeis.org

21, 31, 22, 51, 71, 23, 32, 111, 131, 24, 171, 191, 231, 52, 33, 291, 311, 25, 371, 411, 431, 471, 72, 531, 591, 611, 26, 671, 711, 731, 791, 34, 831, 891, 971, 1011, 1031, 1071, 1091, 1131, 112, 53, 1271, 27, 1311, 1371, 1391, 1491, 1511, 1571, 1631, 1671
Offset: 1

Views

Author

Zak Seidov, Dec 04 2005

Keywords

Comments

If n = p^q, where p is prime and q > 0, then p concatenated with q is in the sequence.
Might be a good "puzzle" sequence - guess the rule given the first ten or so terms.

Examples

			n = 3 = 3^1, so (3 concatenated with 1) = 31 is a term.
		

Crossrefs

Programs

  • Mathematica
    Map[FromDigits, Select[Table[FactorInteger[i], {i, 2, 10000}],
    Length[#] == 1 &], 2] (* Robert Price, Mar 15 2020 *)
  • PARI
    for(n=1,300,fac=factor(n);if(matsize(fac)[1]==1,print1(eval(concat(Str(fac[1,1]),Str(fac[1,2]))),",")))

Formula

a(n) = A067599(A246655(n)) = A067599(A000961(n+1)). - M. F. Hasler, Mar 14 2018

Extensions

Edited and extended by Klaus Brockhaus, Jan 21 2006
Showing 1-10 of 15 results. Next