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 14 results. Next

A230626 Iterate the map x -> A230625(x) starting at n; sequence gives number of steps to reach a prime, or -1 if no prime is ever reached.

Original entry on oeis.org

0, 0, 3, 0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 1, 4, 0, 4, 0, 3, 1, 1, 0, 1, 2, 4, 2, 3, 0, 2, 0, 2, 1, 5, 1, 7, 0, 1, 1, 2, 0, 2, 0, 2, 3, 3, 0, 1, 3, 3, 1, 1, 0, 1, 3, 2, 6, 2, 0, 1, 0, 2, 2, 2, 2, 3, 0, 1, 2, 6, 0, 2, 0, 4, 4, 3, 2, 2, 0, 4, 4, 3, 0, 5, 2, 2, 2, 3
Offset: 2

Views

Author

N. J. A. Sloane, Oct 27 2013

Keywords

Comments

David J. Seal found that the number 255987 is fixed by the map described in A230625 (or equally A287874), so a(255987) = -1. - N. J. A. Sloane, Jun 15 2017
I also observe that the numbers 1007 and 1269 are mapped to each other by that map, as are the numbers 1503 and 3751 (see the b-file submitted by Chai Wah Wu for A230625). So a(1007) = a(1269) = a(1503) = a(3751) = -1. - David J. Seal, Jun 16 2017
a(217) = a(255) = a(446) = a(558) = a(717) = a(735) = a(775) = a(945) = a(958) = -1 since the trajectory either converges to (1007,1269) or to (1503,3751). 255987 has several preimages, e.g. a(7^25*31^19) = a(3^28*7^7*19) = a(7^12*31^51) = -1. a(3568) = 74 ending in the prime 318792605899852268194734519209581. - Chai Wah Wu, Jun 16 2017
See A287878 for the trajectory of 234, which ends at a prime at step 103. - N. J. A. Sloane, Jun 18 2017
See A288894 for the trajectory of 3932. - Sean A. Irvine, Jun 18 2017

Examples

			Starting at 18: 18 = 2*3^2 = 10*11^10 in binary -> 101110 = 46 = 2*23 = 10*10111 -> 1010111 = 87 = 3*29 = 11*11101 -> 1111101 = 125 = 5^3 = 101^11 -> 10111 = 23, prime, taking 4 steps, so a(18) = 4.
		

Crossrefs

Programs

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

Extensions

More terms from Chai Wah Wu, Jul 15 2014

A287875 Iterate the map x -> A230625(x) starting at n; sequence gives the first prime (or 1) that is reached, written in base 2, or -1 if no prime is ever reached.

Original entry on oeis.org

1, 10, 11, 11111, 101, 1011, 111, 1011, 10111, 11111, 1011, 101011, 1101, 10111, 11101, 11111011, 10001, 10111, 10011, 11111011, 11111, 101011, 10111, 101111, 101011, 111001111, 11101, 10111, 11101, 1111111, 11111, 11111, 111011, 10111, 101111, 1111110011101, 100101
Offset: 1

Views

Author

N. J. A. Sloane, Jun 15 2017

Keywords

Comments

David J. Seal found that the number 255987 is fixed by the map described in A230625 (or equally A287874), so a(255987) = -1. (In fact 255987 is the smallest composite number that is fixed.) - N. J. A. Sloane, Jun 15 2017
Also observe that the numbers 1007 and 1269 are mapped to each other by that map, as are the numbers 1503 and 3751 (see the b-file submitted by Chai Wah Wu for A230625). So they are smaller composite values with a(n) = -1, though not fixed. - David J. Seal, Jun 16 2017
a(217) = a(255) = a(446) = a(558) = a(717) = a(735) = a(775) = a(945) = a(958) = -1 since the trajectory either converges to (1007,1269) or to (1503,3751). - Chai Wah Wu, Jun 16 2017

Crossrefs

Cf. A230625, A230626, A230627 (where the primes reached are written in base 10).

Programs

  • Mathematica
    Table[FromDigits@ IntegerDigits[#, 2] &@ If[n == 1, 1, NestWhile[FromDigits[#, 2] &@ Flatten@ Map[IntegerDigits[#, 2] &, FactorInteger[#] /. {p_, 1} :> {p}] &, n, ! PrimeQ@ # &, {2, 1}]], {n, 37}] (* Michael De Vlieger, Jun 24 2017 *)

Extensions

Changed the "escape" value from 0 to -1 to be consistent with A195264. - N. J. A. Sloane, Jul 27 2017

A287878 Trajectory of 234 under the map x -> A230625(x).

Original entry on oeis.org

234, 749, 1003, 1147, 2021, 2799, 7479, 7957, 9453, 30601, 36783, 122563, 246885, 978327, 3926821, 5159983, 9838787, 16121775, 62223239, 113838307, 775077957, 1043973167, 2519959611, 8311144305, 31830468841
Offset: 1

Views

Author

N. J. A. Sloane, Jun 17 2017

Keywords

Comments

Thanks to the work of Chai Wah Wu, it is known that all numbers less than 234 have trajectories that end either at a fixed point or in a cycle of length 2. David J. Seal and Sean A. Irvine have also studied these trajectories. See A230625, A230626, A230627 for the latest information.
For numbers less than 12388, all trajectories either end at a fixed point or in a cycle of length 2.

Crossrefs

A288894 Trajectory of 3932 under the map x -> A230625(x).

Original entry on oeis.org

3932, 11223, 30571, 40521, 125967, 247763, 341915, 779817, 1897841, 6074935, 12439665, 123673573, 158531777, 248736245, 779730449, 4713421981, 6575471649, 4270067827, 5040914531, 1592591247, 2126855121, 3959133009, 16523140695
Offset: 1

Views

Author

Sean A. Irvine, Jun 18 2017

Keywords

Crossrefs

A288847 Numbers whose trajectories under the map x -> A230625(x) never reach a prime.

Original entry on oeis.org

217, 255, 446, 558, 717, 735, 775, 945, 958, 1007, 1062, 1115, 1269, 1344, 1503, 1984, 2215, 2358, 3003, 3751, 3858, 4131, 4471, 5144, 6174, 6627, 6915, 6923, 7033, 7073, 7139, 7434, 7530, 7778, 8125, 8142, 8239, 8335, 8575, 8967, 9186, 9303, 10040, 10179, 10856, 11907, 12081, 12248
Offset: 1

Views

Author

David J. Seal, Jun 18 2017

Keywords

Comments

Sequence suggested by N. J. A. Sloane on the SeqFan mailing list. These are also the numbers n for which A230626(n) = -1 and A230627(n) = A287875(n) = 0. All currently-listed terms (those <= 3858) enter one of the two loops 1007 <-> 1269 and 1503 <-> 3751.
Further values added (Jun 19 2017) based on Sean A. Irvine's extension of the b-file for A230626.

Examples

			217, 255, 945, 1007 and 1269 are in the sequence because under the map x -> A230625(x):
217 = 7*31 = binary 111*11111 -> binary 11111111 = 255
255 = 3*5*17 = binary 11*101*10001 -> binary 1110110001 = 945
945 = 3^3*5*7 = binary 11^11*101*111 -> binary 1111101111 = 1007
1007 = 19*53 = binary 10011*110101 -> binary 10011110101 = 1269
1269 = 3^3*47 = binary 11^11*101111 -> binary 1111101111 = 1007
		

Crossrefs

Extensions

a(43)-a(48) from Chai Wah Wu, Jul 13 2017

A291803 Partial sums of A230625.

Original entry on oeis.org

1, 3, 6, 16, 21, 32, 39, 50, 64, 85, 96, 139, 152, 175, 204, 224, 241, 287, 306, 391, 422, 465, 488, 535, 557, 602, 617, 704, 733, 826, 857, 878, 937, 1018, 1065, 1239, 1276, 1359, 1420, 1513, 1554, 1649, 1692, 1863, 1980, 2067, 2114, 2197, 2227, 2313, 2426
Offset: 1

Views

Author

N. J. A. Sloane, Sep 06 2017

Keywords

Comments

Although A230625 is a very irregular function, here the graph is much smoother, and it appears that a(n) approx= 1.2*n^2. It would be nice to have a more precise estimate.

Crossrefs

Programs

A287763 Numbers n for which A230625(n) < n, where A230625 is the concatenation of the prime factorization written in binary, converted back to decimal.

Original entry on oeis.org

25, 27, 32, 49, 54, 64, 81, 96, 98, 121, 125, 128, 135, 147, 162, 169, 189, 192, 216, 224, 242, 243, 245, 250, 256, 289, 297, 320, 338, 343, 351, 352, 361, 363, 375, 384, 392, 405, 416, 432, 448, 486, 500, 507, 512, 513, 529, 539, 567, 576, 578, 605, 621, 625, 637, 640, 648, 675, 686, 704, 722, 729, 736, 750, 768, 775, 783, 784
Offset: 1

Views

Author

M. F. Hasler, Jun 21 2017

Keywords

Comments

Relevant for the study of closed orbits. (This is to A230625 the analog of A195330 for A080670.) Up to a certain limit, the trajectory of all numbers, under iteration of A230625, end either in a prime (fixed point) or in one of the orbits {1007, 1269} or {1503,3751}.
See A288985 for the analog when A287874 is used instead of A230625, i.e., without converting back the concatenation of the binary strings to decimal, or rather, reading it as a decimal number.

Crossrefs

Programs

  • Mathematica
    Select[Range@ 800, Function[n, FromDigits[#, 2] < n &@ Flatten@ Map[IntegerDigits[#, 2] &, FactorInteger[n] /. {p_, 1} :> {p}]]] (* Michael De Vlieger, Jun 23 2017 *)
  • PARI
    forcomposite(n=1,1e6,A230625(n)
    				

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

A230627 Prime reached in A230626, or -1 if no prime is reached.

Original entry on oeis.org

2, 3, 31, 5, 11, 7, 11, 23, 31, 11, 43, 13, 23, 29, 251, 17, 23, 19, 251, 31, 43, 23, 47, 43, 463, 29, 23, 29, 127, 31, 31, 59, 23, 47, 8093, 37, 83, 61, 127, 41, 179, 43, 467, 463, 23, 47, 83, 127, 467, 113, 173, 53, 47, 23, 179, 241, 127, 59, 349, 61, 179
Offset: 2

Views

Author

N. J. A. Sloane, Oct 27 2013

Keywords

Comments

David J. Seal found that the number 255987 is fixed by the map described in A230625 (or equally A287874), so a(255987) = -1. - N. J. A. Sloane, Jun 15 2017
I also observe that the numbers 1007 and 1269 are mapped to each other by that map, as are the numbers 1503 and 3751 (see the b-file submitted by Chai Wah Wu for A230625). So a(1007) = a(1269) = a(1503) = a(3751) = -1. - David J. Seal, Jun 16 2017
a(217) = a(255) = a(446) = a(558) = a(717) = a(735) = a(775) = a(945) = a(958) = -1 since the trajectory either converges to (1007,1269) or to (1503,3751). - Chai Wah Wu, Jun 16 2017
See A287878 for the trajectory of 234. - N. J. A. Sloane, Jun 17 2017
See A288894 for the trajectory of 3932. - Sean A. Irvine, Jun 18 2017
The latest information seems to be that for numbers less than 12388, all trajectories either end at a fixed point or in a cycle of length 2. - N. J. A. Sloane, Jul 27 2017

Crossrefs

Base-2 analog to A195264.
See A287875 for these same numbers written in binary.
See A288847 for where the values -1 occur.

Programs

  • Mathematica
    fn[n_] := FromDigits[Flatten[IntegerDigits[ReplaceAll[FactorInteger[n], {x_, 1} -> {x}], 2]], 2];
    Table[NestWhile[fn, n, # != 1 && ! PrimeQ[#] &], {n, 2, 50}] (* Robert Price, Mar 16 2020 *)

Extensions

More terms from Chai Wah Wu, Jul 15 2014
Changed the "escape" value from 0 to -1 to be consistent with A195264. - N. J. A. Sloane, Jul 27 2017

A287874 Concatenate prime factorization as in A080670, but write everything in binary.

Original entry on oeis.org

1, 10, 11, 1010, 101, 1011, 111, 1011, 1110, 10101, 1011, 101011, 1101, 10111, 11101, 10100, 10001, 101110, 10011, 1010101, 11111, 101011, 10111, 101111, 10110, 101101, 1111, 1010111, 11101, 1011101, 11111, 10101, 111011, 1010001, 101111, 10101110, 100101
Offset: 1

Views

Author

N. J. A. Sloane, Jun 15 2017

Keywords

Comments

As in A080670 the prime factorization of n is written as p1^e1*...*pN^eN (except for exponents eK = 1 which are omitted), with all factors and exponents in binary (cf. A007088). Then "^" and "*" signs are dropped and all binary digits are concatenated.
See A230625 for the terms written in base 10, and for further information (fixed points, trajectories).

Examples

			a(1) = 1 by convention.
a(2) = 10 (= 2 written in binary).
a(4) = 1010 = concatenate(10,10), since 4 = 2^2 = 10[2] ^ 10[2].
a(6) = 1011 = concatenate(10,11), since 6 = 2*3 = 10[2] * 11[2].
a(8) = 1011 = concatenate(10,11), since 8 = 2^3 = 10[2] ^ 11[2].
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local F, L, i;
        F:= map(op,subs(1=NULL, sort(ifactors(n)[2], (a,b) -> a[1] < b[1])));
        F:= map(convert, F, binary);
        L:= map(length,F);
        L:= ListTools:-Reverse(ListTools:-PartialSums(ListTools:-Reverse(L)));
        add(F[i]*10^L[i+1],i=1..nops(F)-1)+F[-1];
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Jun 20 2017
  • Mathematica
    fn[1] = 1; fn[n_] := FromDigits[Flatten[IntegerDigits[DeleteCases[Flatten[FactorInteger[n]], 1], 2]]];
    Table[fn[n], {n, 37}] (* Robert Price, Mar 16 2020 *)
  • PARI
    A287874(n)=if(n>1,fromdigits(concat(apply(binary,select(t->t>1,concat(Col(factor(n))~)))),10),1) \\ M. F. Hasler, Jun 21 2017
    
  • Python
    from sympy import factorint
    def a(n):
        f=factorint(n)
        return 1 if n==1 else int("".join(bin(i)[2:] + bin(f[i])[2:] if f[i]!=1 else bin(i)[2:] for i in f))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017

Formula

a(n) = A007088(A230625(n)). - R. J. Mathar, Jun 16 2017

Extensions

Edited by M. F. Hasler, Jun 21 2017
Showing 1-10 of 14 results. Next