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-4 of 4 results.

A290329 Iterate the map x -> A289667(x) starting at n; sequence gives primes reached, or -1 if no prime is ever reached.

Original entry on oeis.org

2, 3, 71, 5, 71, 7, 71, 11, 23, 11, 5261, 13, 17, 23, 703455573449, 17, 703455573449, 19, 5261, 71, 703455573449, 23, 727, 17, 67, 21544131687786037881228990839860266551231, 79, 29, 21544131687786037881228990839860266551231, 31, 23, 239, 71, 229, 227, 37, 73
Offset: 2

Views

Author

Chai Wah Wu, Jul 27 2017

Keywords

Comments

Base 3 analog of A195264 and A230627.

Crossrefs

Programs

  • Maple
    A290329 := proc(n)
        local nitr ;
        nitr := n ;
        while ( not isprime(nitr) and nitr <> 1) do
            nitr := A289667(nitr) ;
        end do:
        return nitr ;
    end proc:
    seq(A290329(n),n=1..20) ; # R. J. Mathar, Aug 05 2017
  • Mathematica
    Table[NestWhile[FromDigits[#, 3] &@ Flatten@ Map[IntegerDigits[#, 3] &, FactorInteger[#] /. {p_, e_} /; p > 0 :> If[e == 1, p, {p, e}]] &, n, ! PrimeQ@ # &], {n, 2, 38}] (* Michael De Vlieger, Jul 29 2017 *)

A290328 Iterate the map x -> A289667(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, 4, 0, 3, 0, 3, 1, 1, 0, 7, 0, 2, 2, 20, 0, 19, 0, 5, 2, 19, 0, 4, 1, 1, 52, 1, 0, 51, 0, 1, 2, 1, 2, 1, 0, 1, 4, 51, 0, 2, 0, 1, 20, 5, 0
Offset: 2

Views

Author

Chai Wah Wu, Jul 27 2017

Keywords

Comments

Base 3 analog of A230626. See A290350 for the trajectory of 48.
If a(48) != -1, then a(48) > 120. - Chai Wah Wu, Jul 29 2017

Crossrefs

Programs

  • Mathematica
    Table[-1 + Length@ NestWhileList[FromDigits[#, 3] &@ Flatten@ Map[IntegerDigits[#, 3] &, FactorInteger[#] /. {p_, e_} /; p > 0 :> If[e == 1, p, {p, e}]] &, n, ! PrimeQ@ # &], {n, 2, 47}] (* Michael De Vlieger, Jul 29 2017 *)

A290350 Trajectory of 48 under the map x -> A289667(x).

Original entry on oeis.org

48, 201, 310, 1894, 5321, 12706, 19475, 38759, 16151, 23120, 16496, 49145, 108244, 499453, 3436777, 10278262, 33836945, 240512002, 913716328, 939389234, 3295603306, 27693125191, 43752137122, 225022142762, 2016929822398, 21026295155804, 66261353668847, 675731396348989
Offset: 1

Views

Author

Chai Wah Wu, Jul 28 2017

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[#, 3] &@ Flatten@ Map[IntegerDigits[#, 3] &, FactorInteger[#] /. {p_, e_} /; p > 0 :> If[e == 1, p, {p, e}]] &, 48, 27] (* Michael De Vlieger, Jul 29 2017 *)

A230625 Concatenate prime factorization written in binary, convert back to decimal.

Original entry on oeis.org

1, 2, 3, 10, 5, 11, 7, 11, 14, 21, 11, 43, 13, 23, 29, 20, 17, 46, 19, 85, 31, 43, 23, 47, 22, 45, 15, 87, 29, 93, 31, 21, 59, 81, 47, 174, 37, 83, 61, 93, 41, 95, 43, 171, 117, 87, 47, 83, 30, 86, 113, 173, 53, 47, 91, 95, 115, 93, 59, 349, 61, 95, 119, 22
Offset: 1

Views

Author

N. J. A. Sloane, Oct 27 2013

Keywords

Comments

As in A080670 the prime factorization 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, all binary digits are concatenated, and the result is converted back to decimal (base 10). - M. F. Hasler, Jun 21 2017
The first nontrivial fixed point of this function is 255987. Smaller numbers such that a(a(n)) = n are 1007, 1269; 1503, 3751. See A230627 for further information. - M. F. Hasler, Jun 21 2017
255987 is the only nontrivial fixed point less than 10000000. - Benjamin Knight, May 16 2018

Examples

			6 = 2*3 = (in binary) 10*11 -> 1011 = 11 in base 10, so a(6) = 11.
20 = 2^2*5 = (in binary) 10^10*101 -> 1010101 = 85 in base 10, so a(20) = 85.
		

Crossrefs

See A289667 for the base 3 version.
See A291803 for partial sums.

Programs

  • Maple
    # take ifsSorted from A080670
    A230625 := proc(n)
        local Ldgs, p,eb,pb,b ;
        b := 2;
        if n = 1 then
            return 1;
        end if;
        Ldgs := [] ;
        for p in ifsSorted(n) do
            pb := convert(op(1,p),base,b) ;
            Ldgs := [op(pb),op(Ldgs)] ;
            if op(2, p) > 1 then
                eb := convert(op(2,p),base,b) ;
                Ldgs := [op(eb),op(Ldgs)] ;
            end if;
        end do:
        add( op(e,Ldgs)*b^(e-1),e=1..nops(Ldgs)) ;
    end proc:
    seq(A230625(n),n=1..30) ; # R. J. Mathar, Aug 05 2017
  • Mathematica
    Table[FromDigits[#, 2] &@ Flatten@ Map[IntegerDigits[#, 2] &, FactorInteger[n] /. {p_, 1} :> {p}], {n, 64}] (* Michael De Vlieger, Jun 23 2017 *)
  • PARI
    a(n) = {if (n==1, return(1)); f = factor(n); s = []; for (i=1, #f~, s = concat(s, binary(f[i, 1])); if (f[i, 2] != 1, s = concat(s, binary(f[i, 2])));); subst(Pol(s), x, 2);} \\ Michel Marcus, Jul 15 2014
    
  • PARI
    A230625(n)=n>1||return(1);fold((x,y)->if(y>1,x<M. F. Hasler, Jun 21 2017
  • Python
    import sympy
    [int(''.join([bin(y)[2:] for x in sorted(sympy.ntheory.factorint(n).items()) for y in x if y != 1]),2) for n in range(2,100)] # compute a(n) for n > 1
    # Chai Wah Wu, Jul 15 2014
    

Extensions

More terms from Chai Wah Wu, Jul 15 2014
Added self-contained definition. - M. F. Hasler, Jun 21 2017
Showing 1-4 of 4 results.