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

A084317 Concatenation of the prime factors of n, in increasing order.

Original entry on oeis.org

0, 2, 3, 2, 5, 23, 7, 2, 3, 25, 11, 23, 13, 27, 35, 2, 17, 23, 19, 25, 37, 211, 23, 23, 5, 213, 3, 27, 29, 235, 31, 2, 311, 217, 57, 23, 37, 219, 313, 25, 41, 237, 43, 211, 35, 223, 47, 23, 7, 25, 317, 213, 53, 23, 511, 27, 319, 229, 59, 235, 61, 231, 37, 2, 513, 2311, 67
Offset: 1

Views

Author

Labos Elemer, Jun 16 2003

Keywords

Comments

Prime factor set of n is concatenated as follows:
1. factorize n;
2. order prime factors without exponents in order of magnitude;
3. concatenate digits to get a(n) as a decimal number.
The choice a(1)=0 is conventional; a(1)=1 would have been another possible choice. - M. F. Hasler, Oct 21 2014

Examples

			a(1) = 0 since 1 has no prime factors to concatenate.
n = 2520 = 2*2*2*3*3*5*7; prime factor set = {2,3,5,7}, so a(2520) = 2357.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> parse(cat(`if`(n=1, 0, sort([factorset(n)[]])[]))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 06 2014
  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] lf[x_] := Length[FactorInteger[x]] nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] conc[x_] := Fold[nd, 0, Flatten[IntegerDigits[ba[x]], 1]] Table[conc[w], {w, 1, 128}]
    {0}~Join~Table[FromDigits@ Flatten@ IntegerDigits@ Map[First, FactorInteger@ n], {n, 2, 67}] (* Michael De Vlieger, May 02 2016 *)
  • PARI
    A084317(n)=if(n>1,eval(concat(apply(t->Str(t),factor(n)[,1]~)))) \\ Unfortunately up to PARI version 2.7.1 at least, "Str" cannot be applied as a closure (= function), but Str = Str() = "". - M. F. Hasler, Oct 22 2014

Formula

a(n) = a(squarefree kernel of n) = a(n^k) for any power k >= 1.

Extensions

Edited by M. F. Hasler, Oct 21 2014

A084318 Iterate function described in A084317 if started at initial value n until reaching a fixed point.

Original entry on oeis.org

0, 2, 3, 2, 5, 23, 7, 2, 3, 5, 11, 23, 13, 3, 1129, 2, 17, 23, 19, 5, 37, 211, 23, 23, 5, 3251, 3, 3, 29, 547, 31, 2, 311, 31397, 1129, 23, 37, 373, 313, 5, 41, 379, 43, 211, 1129, 223, 47, 23, 7, 5, 317, 3251, 53, 23, 773, 3, 1129, 229, 59, 547, 61, 31237, 37, 2, 1129, 2311
Offset: 1

Views

Author

Labos Elemer, Jun 16 2003

Keywords

Comments

Conjecture: fixed point always exists.
Some initial values capriciously provide very large prime fixed-points. This behavior is illustrated in A084319 for initial value n=91.
Unlike the related home primes A037274, the trajectory of numbers in this procedure is not strictly increasing. Of the 8770 numbers < 10000 that have trajectories (that is, that are neither 1 nor prime) 3727 decrease at least once before reaching 30 digits. A sequence with no decreases is twice as likely to not terminate before 30 digits (10.0%) as one that has at least one decrease (4.8%). - Christian N. K. Anderson, May 04 2013

Examples

			a(0)=0 since no prime factors to concatenate;
a[p^j]=p for p prime(powers);
n=95=519: fixed-point list is {95,519,3173,19167,36389},
so a(95)=36389, a prime.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] lf[x_] := Length[FactorInteger[x]] nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] conc[x_] := Fold[nd, 0, Flatten[IntegerDigits[ba[x]], 1]] Table[FixedPoint[conc, w], {w, 1, 90}] Table[conc[w], {w, 1, 128}]

A085307 a(1) = 1; for n > 1, concatenate distinct prime factors of n in decreasing order.

Original entry on oeis.org

1, 2, 3, 2, 5, 32, 7, 2, 3, 52, 11, 32, 13, 72, 53, 2, 17, 32, 19, 52, 73, 112, 23, 32, 5, 132, 3, 72, 29, 532, 31, 2, 113, 172, 75, 32, 37, 192, 133, 52, 41, 732, 43, 112, 53, 232, 47, 32, 7, 52, 173, 132, 53, 32, 115, 72, 193, 292, 59, 532, 61, 312, 73, 2, 135, 1132, 67
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Comments

n and a(n) have the same parity.

Examples

			m = 100 = 2*2*5*5 -> {2,5} -> {5,2} -> 52 = a(100);
a(510510) = 1713117532, while A084317(510510) = 2357111317.
		

Crossrefs

In A084317 the order of factors is increasing.

Programs

  • Maple
    with(numtheory):
    a:= n-> parse(cat(`if`(n=1, 1, sort([factorset(n)[]], `>`)[]))):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 02 2016
  • Mathematica
    f[n_] := FromDigits[ Flatten[ IntegerDigits /@ Reverse[ Flatten[ Table[ # [[1]], {1}] & /@ FactorInteger[n]]]]]; Table[ f[n], {n, 1, 70}]
    Table[FromDigits[Flatten[IntegerDigits/@Reverse[FactorInteger[n][[All, 1]]]]],{n,90}] (* Harvey P. Dale, Oct 10 2017 *)

Formula

Algorithm:
1. factorize n;
2. order prime factors by decreasing size;
3. concatenate prime factors and interpret the result as a decimal number.

Extensions

Edited by Robert G. Wilson v, Jul 15 2003

A085308 Iterate function described in A085308 (= reverse concatenation of prime factors); a(n) is either 1# the fixed point[=prime] if it exists at all: 2# a(2k)=1 labels that no convergence with most even initial values, in contrary mostly rapid divergence is the case; 3# a(n)=0 if n=1 or if the iteration results in nontrivial attractor with cycle length larger than one.

Original entry on oeis.org

0, 2, 3, 2, 5, 2, 7, 2, 3, 1, 11, 2, 13, 2, 53, 2, 17, 2, 19, 1, 73, 2, 23, 2, 5, 1, 3, 2, 29, 1, 31, 2, 113, 2, 53, 2, 37, 2, 197, 1, 41, 1, 43, 2, 53, 1, 47, 2, 7, 1, 173, 1, 53, 2, 41113, 2, 193, 1, 59, 1, 61, 1, 73, 2, 53, 1, 67, 1, 233, 1, 2, 73, 1, 53, 1, 197, 1, 79, 1, 3, 1, 83, 1, 53, 1
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Examples

			n=even: remains even: m = 100 = 2*2*5*5 -> {2,5} -> {5,2} -> 52 = a(100);
n = 2^i*3^j: a(n)=2 since iteration list is {n,32,2}; these
are the known convergent even cases of initial value.
n=143: a(143) = 44864859110711 because the iteration list is
{143, 1311, 23193, 8593, 66113, 388917, 547793, 2273241, 55311373, 989474313, 8914183373, 84859143973, 528059391607, 44864859110711};
a(n) = 0 for n = 213, 323, 639, 713 ending in {713, 3123, 3473, 15123}; terminal orbit of length = 4.
All possible cases occur: fixed point, divergence, terminal cycle.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] lf[x_] := Length[FactorInteger[x]] nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] rec[x_] := Fold[nd, 0, Flatten[IntegerDigits[Reverse[ba[x]]], 1]] Table[rec[w], {w, 1, 128}]

Formula

Algorithm:
1. factorize n;
2. arrange prime factors by decreasing size;
3. concatenate prime factors and interpret the result as a decimal number.

A085309 Initial values providing nontrivial cyclic attractor when function defined in A085307 is iterated.

Original entry on oeis.org

213, 323, 639, 713
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Examples

			n=213 gives {213,713,3123,3473,15123,713},
n=323 gives {323,1917,713,3123,3473,15123,713},
n=639 gives {639,713,3123,3473,15123,713}.
		

Crossrefs

Formula

Algorithm: 1# factorize n; 2# arrange prime-factors by decreasing size; 3# concatenate prime factors and interpret the result as decimal number.Iterate 1#, 2#, 3#.

A343156 Starting at n, a(n) = number of iterations of the map x -> A084317(x) (concatenate distinct prime factors of x) required to reach a prime, or -1 if no prime is ever reached.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 07 2021

Keywords

Comments

Judging by the behavior of similar sequences, it is likely that almost all values of a(n) are -1. n = 407 (see A343157) seems to be the first open case.

Examples

			10 = 2*5 -> 25 = 5^2 -> 5, prime, taking two steps, so a(10)=2.
a(91) = 64: see A084319.
		

References

  • Eric Angelini, W. Edwin Clark, Hans Havermann, Frank Stevenson, Allan C. Wechsler, and others, Postings to Math Fun mailing list, April 2021.

Crossrefs

See A343158 for when k first appears.

A343158 a(n) is the smallest m such that A343156(m) = n, or -1 if no such m exists.

Original entry on oeis.org

2, 4, 10, 35, 15, 34, 190, 290, 303, 395, 130, 465, 553, 265, 195, 663, 218, 582, 481, 858, 714, 418, 345, 530, 382, 1771, 1207, 2098, 3890, 1426, 2090, 4834, 4618, 627, 2321, 2163, 326, 866, 3302, 1298, 3886, 3094, 1086, 6130, 4807, 3646, 5181, 905, 3945, 5753
Offset: 0

Views

Author

N. J. A. Sloane, Apr 07 2021

Keywords

Examples

			2 takes 0 steps to reach a prime, so a(0) = 2.
10 -> 25 -> 5 takes 2 steps to reach a prime (and no smaller number takes that many steps), so a(2) = 10.
35 -> 57 -> 319 -> 1129 takes 3 steps to reach a prime (and no smaller number takes that many steps), so a(3) = 35.
		

References

  • Eric Angelini, W. Edwin Clark, Hans Havermann, Frank Stevenson, Allan C. Wechsler, and others, Postings to Math Fun mailing list, April 2021.

Crossrefs

Programs

  • PARI
    is(m, n) = my(k=m); for(i=1, n, if(isprime(k), return(0), k=eval(concat(apply(t->Str(t), factor(k)[, 1]~))))); isprime(k);
    a(n) = for(m=2, oo, if(is(m, n), return(m))); \\ Jinyuan Wang, Jul 16 2022

Extensions

a(32)-a(42) from Hans Havermann, Apr 07 2021
a(43)-a(48) from Hans Havermann, Apr 08 2021
a(49) from Jinyuan Wang, Jul 16 2022
Showing 1-7 of 7 results.