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

A145077 Highest point reached in trajectory of n described in A098282, or -1 if no cycle is ever reached.

Original entry on oeis.org

1, 2, 3, 11, 5, 131212367, 11, 1910112963, 23, 131212367, 11, 131212367, 131212367, 14, 23, 11126, 17, 222312455509, 1910112963, 1135, 1112122, 23, 23, 1112122, 33, 11126, 133156118699543, 222312455509, 131212367, 1135, 31, 111151786119, 33, 34, 35, 2455612
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Feb 09 2009

Keywords

Comments

a(52) is currently unknown. - Donovan Johnson, Jan 08 2011
a(40) is probably incorrect and should be 11111114421614356. (See corrections to A098282 and A144914.)

Crossrefs

Extensions

More terms from Donovan Johnson, Jan 08 2011

A145078 Minimal value of cycle of trajectory of n described in A098282, or -1 if no cycle is ever reached.

Original entry on oeis.org

1, 1, 1, 1, 1, 9, 1, 9, 9, 9, 1, 9, 9, 14, 9, 1, 1, 1, 9, 9, 1, 9, 9, 1, 25, 1, 1, 1, 9, 9, 1, 1, 25, 1, 1, 1, 9, 1, 1, 9, 9, 1, 14, 1, 9, 9, 9, 9, 1, 9, 1
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Feb 09 2009

Keywords

Comments

a(52) is currently unknown. - Donovan Johnson
a(40) is probably incorrect and should be 1. (See corrections to A098282 and A144914.) - Andrew Howroyd, Feb 06 2018

Crossrefs

Extensions

Comment edited by John W. Layman, Nov 03 2010
a(1)-a(18) confirmed and a(19)-a(39) added by John W. Layman, Nov 03 2010
a(40) and a(51) from Donovan Johnson, Jan 08 2011

A145079 Length of cycle of trajectory of n described in A098282, or -1 if no cycle is ever reached.

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 4, 4, 4, 1, 4, 4, 1, 4, 1, 1, 1, 4, 4, 1, 4, 4, 1, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 4, 1, 1, 4, 4, 1, 1, 1, 4, 4, 4, 4, 1, 4, 1
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Feb 09 2009

Keywords

Comments

a(52) is currently unknown. - Donovan Johnson
a(40) is probably incorrect and should be 1. (See corrections to A098282 and A144914.)

Crossrefs

Extensions

a(19)-a(39) from John W. Layman, Mar 12 2010
a(40)-a(51) from Donovan Johnson, Jan 08 2011

A087712 a(1) = 1; if n = k-th prime, a(n) = k; otherwise write all prime factors of n in nondecreasing order, replace each prime with its rank, and concatenate the ranks.

Original entry on oeis.org

1, 1, 2, 11, 3, 12, 4, 111, 22, 13, 5, 112, 6, 14, 23, 1111, 7, 122, 8, 113, 24, 15, 9, 1112, 33, 16, 222, 114, 10, 123, 11, 11111, 25, 17, 34, 1122, 12, 18, 26, 1113, 13, 124, 14, 115, 223, 19, 15, 11112, 44, 133, 27, 116, 16, 1222, 35, 1114, 28, 110, 17, 1123, 18
Offset: 1

Views

Author

Eric Angelini, Feb 02 2009

Keywords

Comments

Concatenations of consecutive entries of A112798. - R. J. Mathar, Feb 09 2009
The old entry with this A-number was a duplicate of A082467.

Examples

			n = 2 = first prime, a(2) = 1.
n = 3 = second prime, a(3) = 2.
n = 4 = 2*2 -> 1,1 -> 11, so a(4) = 11.
n = 6 = 2*3 -> 1,2 -> 12, so a(6) = 12.
n = 12 = 2*2*3 -> 1,1,2 -> 112, so a(12) = 112.
		

Crossrefs

See A098282 for lengths of trajectories. Cf. A077960, A156055.

Programs

  • Haskell
    a087712 1 = 1
    a087712 n = read $ concatMap (show . a049084) $ a027746_row n :: Integer
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Maple
    # Maple program from R. J. Mathar, Feb 08 2009: (Start)
    cat2 := proc(a,b) a*10^(max(1,ilog10(b)+1))+b ; end:
    A049084 := proc(p) if isprime(p) then numtheory[pi](p) ; else 0 ; fi; end:
    A087712 := proc(n) local pf,a,p,ex ; if isprime(n) then A049084(n) ; elif n = 1 then 1 ; else pf := ifactors(n)[2] ; a := 0 ; for p in pf do for ex from 1 to op(2,p) do a := cat2(a, A049084(op(1,p)) ) ; od: od: fi; end:
    seq(A087712(n),n=1..140); # (End)
    # (Maple program from David Applegate and N. J. A. Sloane, Feb 09 2009)
    with(numtheory):
    f := proc(n) local t1, v, r, x, j;
    if (n = 1) then return 1; end if;
    t1 := ifactors(n): v := 0;
    for x in op(2,t1) do r := pi(x[1]):
    for j from 1 to x[2] do
    v := v * 10^length(r) + r;
    end do; end do; v; end proc;
  • Mathematica
    f[n_] := If[n == 1, 1, FromDigits@ Flatten[ IntegerDigits@# & /@ (PrimePi@# & /@ Flatten[ Table[ First@#, {Last@#}] & /@ FactorInteger@ n])]]; Array[f, 61] (* Robert G. Wilson v, Jun 06 2011 *)
  • Python
    from sympy import factorint, primepi
    def a(n):
        if n == 1: return 1
        return int("".join(str(primepi(p))*e for p, e in factorint(n).items()))
    print([a(n) for n in range(1, 62)]) # Michael S. Branicky, Oct 01 2024

Extensions

More terms from R. J. Mathar (Feb 08 2009) and independently from David Applegate and N. J. A. Sloane, Feb 09 2009

A077960 Trajectory of 18 under iteration of the map k -> A087712(k).

Original entry on oeis.org

18, 122, 118, 117, 226, 130, 136, 1117, 187, 57, 28, 114, 128, 1111111, 52628, 111748, 114663, 212174, 110111, 35131, 81414, 122615, 33341, 4584, 111243, 25475, 33171, 21339, 22351, 41127, 21621, 2920, 111321, 2224811, 223249
Offset: 0

Views

Author

N. J. A. Sloane, Feb 10 2009

Keywords

Comments

a(n) = 1 for n >= 111.
The old entry with this A-number was a duplicate of A077919.

Crossrefs

A144914 Trajectory of 40 under iteration of the map k -> A087712(k).

Original entry on oeis.org

40, 1113, 2416, 111136, 11111936, 1111111115298, 1291622143616, 11111114421614356, 1180446322201364, 114902402126478, 12851299161710, 1326073277802, 124682398018, 113183781186, 124271634111, 21770237322, 1222221326084, 1151561573555, 33189494813, 542767316
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2009

Keywords

Comments

Does this trajectory converge?
Yes, for n >= 99 a(n) = 1. - Andrew Howroyd, Feb 06 2018

Crossrefs

Extensions

Terms a(8) and beyond corrected by Andrew Howroyd, Feb 06 2018

A144760 Trajectory of 6 under iteration of the map k -> A087712(k).

Original entry on oeis.org

6, 12, 112, 11114, 1733, 270, 12223, 7128, 11122225, 33991010, 13913661, 2107998, 12222775, 33910130, 131212367, 56113213, 6837229, 4201627, 266366, 112430, 131359, 7981, 969, 278, 134, 119, 47, 15, 23, 9, 22, 15, 23, 9, 22
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2009

Keywords

Comments

31 steps to see a repeat.

Crossrefs

A144813 Trajectory of 8 under iteration of the map k -> A087712(k).

Original entry on oeis.org

8, 111, 212, 1116, 112211, 52626, 124441, 28192, 11111152, 111165448, 1117261018, 1910112963, 252163429, 42205629, 2914219, 454002, 127605, 231542, 110938, 15631, 44510, 13605, 23155, 3582, 12246, 12637, 1509, 296
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2009

Keywords

Comments

55 steps to see a repeat.

Crossrefs

A156055 Define a map f by f(0) = f(1) = 0, otherwise f(k) = A087712(k); then a(n) is the number of steps for the trajectory of n under repeated iteration of f to "terminate".

Original entry on oeis.org

1, 2, 3, 6, 4, 30, 7, 54, 3, 32, 5, 29, 31, 0, 3, 19, 8, 112, 55, 15, 27, 3, 3, 26, 1, 20, 223, 102, 33, 13, 6, 162, 1, 9, 10, 75, 30, 113, 21
Offset: 1

Views

Author

Robert G. Wilson v, Feb 02 2009

Keywords

Comments

Here "terminate" means reaching 0 or a cycle.
From M. F. Hasler, Feb 11 2009: (Start)
"Reaching a cycle" could be better defined: does it mean "reach a value that occurred earlier" or "reach an element belonging to a cycle"?
I think the second is the case, but the value 0 is currently listed at n=14, wouldn't it correspond to x=15 = least element of a nontrivial cycle?
So would the offset be 2 ? or is there a missing term (since the first terms 1,2,3 seem well to correspond to x=1,2,3)? (End)

Examples

			a(4) = 6 because 4 -> [{2,2}->{1,1}] ->[{11}->{5}] -> [{5}->{3}] -> [{3}->{2}] -> [{2}->{1}] -> [{1}->{0}].
		

Crossrefs

A variant of A098282, which is the official version of this sequence.
Cf. A087712.

Programs

  • Mathematica
    f[n_] := FromDigits@ Flatten[ IntegerDigits@# & /@ (PrimePi@# & /@ Flatten[ Table[ First@#, {Last@#}] & /@ FactorInteger@n])]; g[n_] := Length@ NestWhileList[f, n, UnsameQ, All] - 2; Array[g, 39]

Extensions

Edited by N. J. A. Sloane, Feb 10 2009

A144814 Trajectory of 10 under iteration of the map k -> A087712(k).

Original entry on oeis.org

10, 13, 6, 12, 112, 11114, 1733, 270, 12223, 7128, 11122225, 33991010, 13913661, 2107998, 12222775, 33910130, 131212367, 56113213, 6837229, 4201627, 266366, 112430, 131359, 7981, 969, 278, 134, 119, 47, 15, 23, 9, 22, 15
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2009

Keywords

Comments

33 steps to see a repeat.

Crossrefs

Showing 1-10 of 13 results. Next