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

A120716 a(1)=1, a(p)=p if p is a prime. Otherwise, start with n and iterate the map (k -> concatenation of nontrivial divisors of k) until we reach a prime q; then a(n) = q. If we never reach a prime, a(n) = -1.

Original entry on oeis.org

1, 2, 3, 2, 5, 23, 7
Offset: 1

Views

Author

N. J. A. Sloane, Jul 19 2007

Keywords

Comments

a(8) is currently unknown.
The sequence continues from a(8)-a(100): >10^50, 3, 5, 11, >10^50, 13, 313, 1129, >10^50, 17, >10^50, 19, >10^50, 37, 211, 23, >10^50, 5, 3251, 313, >10^50, 29, >10^50, 31, >10^50, 311, >10^50, 1129, >10^50, 37, 373, 313, >10^50, 41, >10^50, 43, >10^50, >10^50, 223, 47, >10^50, 7, >10^50, 317, >10^50, 53, 23691827, 773, >10^50, 1129, 229, 59, >10^50, 61, >10^50, 378593, >10^50, >10^5", >10^50, 67, >10^50, 39191573, >10^50, 71, >10^50, 73, 379, >10^50, >10^50, 3979237, 236132639, 79, >10^50, >10^50, 241, 83, >10^50, 3137, >10^50, 3983249, >10^50, 89, >10^50, >10^50, >10^50, 331, 1319, 36389, >10^50, 97, >10^50, 391133, >10^50. - Robert Price, Mar 27 2019

Examples

			4 -> 2, prime, so a(4) = 2.
6 -> 2,3 -> 23, prime, so a(6) = 23.
8 -> 2,4 -> 24 -> 2,3,4,6,8,12 -> 2346812 -> 2,4,13,26,52,45131,90262,180524,586703,1173406 -> 2413265245131902621805245867031173406 -> ? (see link for the continuation)
9 -> 3, prime, so a(9) = 3.
21 -> 3,7 -> 37, prime, so a(21) = 37.
		

Crossrefs

Programs

  • Mathematica
    A120716[n_] := Module[{x},
       If[n == 1, Return[1]];
       If[PrimeQ[n], Return[n]];
       x = FromDigits[Flatten[IntegerDigits[Rest[Most[Divisors[n]]]]]];
       If[x > 10^50, Return[">10^50"], A120716[x]]];
    Table[A120716[n], {n, 1, 100}] (* Robert Price, Mar 27 2019 *)

Extensions

Edited by Michel Marcus, Mar 09 2023

A120712 Numbers k with the property that the concatenation of the nontrivial divisors of k (i.e., excluding 1 and k) is a prime.

Original entry on oeis.org

4, 6, 9, 21, 22, 25, 33, 39, 46, 49, 51, 54, 58, 78, 82, 93, 99, 111, 115, 121, 133, 141, 142, 147, 153, 154, 159, 162, 166, 169, 174, 177, 186, 187, 189, 201, 205, 219, 226, 235, 237, 247, 249, 253, 262, 267, 274, 286, 289, 291, 294, 301, 318
Offset: 1

Views

Author

Eric Angelini, Jul 19 2007

Keywords

Examples

			   k |    divisors    | concatenation
  ---+----------------+--------------
   4 | (1) 2      (4) |        2
   6 | (1) 2, 3   (6) |       23
   9 | (1) 3      (9) |        3
  21 | (1) 3, 7  (21) |       37
  22 | (1) 2, 11 (22) |      211
  25 | (1) 5     (25) |        5
  33 | (1) 3, 11 (33) |      311
  39 | (1) 3, 13 (39) |      313
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for k from 2 to 1000 do:
    v0:=divisors(k):
    nn:=nops(v0):
    if nn > 2 then
    v1:=[seq(v0[j],j=2..nn-1)]:
    v2:=cat(seq(convert(v1[n],string),n=1..nops(v1))):
    v3:=parse(v2):
    if isprime(v3) = true then lprint(k,v3) fi:
    fi:
    od: # Simon Plouffe
  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Most@ Rest@ Divisors@ n; Select[ Range[2, 320], fQ]
  • Python
    from sympy import divisors, isprime
    def ok(n):
        s = "".join(str(d) for d in divisors(n)[1:-1])
        return s != "" and isprime(int(s))
    print([k for k in range(319) if ok(k)]) # Michael S. Branicky, Oct 01 2024

Extensions

Name edited by Michel Marcus, Mar 09 2023

A130139 Let f denote the map that replaces k with the concatenation of its nontrivial divisors, written in increasing order, each divisor being written in base 10 in the normal way. Then a(n) = prime reached when starting at 2n+1 and iterating f.

Original entry on oeis.org

1, 3, 5, 7, 3, 11, 13, 1129, 17, 19, 37, 23, 5, 313, 29, 31, 311, 1129, 37, 313, 41, 43
Offset: 0

Views

Author

N. J. A. Sloane, Jul 30 2007

Keywords

Comments

If 2n+1 is 1 or a prime, set a(n) = 2n+1. If no prime is ever reached, set a(n) = -1.

Examples

			n = 7: 2n+1 = 15 = 3*5 -> 35 = 5*7 -> 57 = 3*19 -> 319 = 11*29 -> 1129, prime, so a(7) = 1129.
		

Crossrefs

Cf. A037279, A130140, A130141, A130142. A bisection of A120716.

Programs

  • Python
    from sympy import divisors, isprime
    def f(n): return int("".join(str(d) for d in divisors(n)[1:-1]))
    def a(n):
        if n == 0: return 1
        fn, c = 2*n + 1, 0
        while not isprime(fn):
            fn, c = f(fn), c+1
        return fn
    print([a(n) for n in range(22)]) # Michael S. Branicky, Jul 11 2022

Extensions

Name edited by Michel Marcus, Mar 09 2023

A130141 Let f denote the map that replaces k with the concatenation of its nontrivial divisors, written in decreasing order, each divisor being written in base 10 in the normal way. Then a(n) = prime reached when starting at 2n+1 and iterating f.

Original entry on oeis.org

1, 3, 5, 7, 3, 11, 13, 53, 17, 19, 73, 23, 5, 313, 29, 31, 113
Offset: 0

Views

Author

Carsten Lund (lund(AT)research.att.com), Jul 30 2007, Aug 01 2007

Keywords

Comments

If 2n+1 is 1 or a prime, set a(n) = 2n+1. If no prime is ever reached, set a(n) = -1.
The value of a(17) is currently unknown.
From Klaus Brockhaus, Aug 01 2007: (Start)
"The sequence, starting from the beginning but writing 0 when a number with more than 90 digits is reached, is:
1,3,5,7,3,11,13,53,17,19,73,23,5,313,29,31,113,0,37,197,41,43,0,47,7,173,53,0,193,
59,61,0,0,67,233,71,73,0,391393,79,9313991471335749211973,83,0,293,89,137,313,
0,97,0,101,103,0,107,109,373,113,0,391393,593,11,1993,0,127,433,131,197,0,137,139,
0,0,0,0,149,151,511793,0,157,1141931201,6113,163,0,167,13,0,173,0,593,179,181,
613,12575251553,0,0,191,193,0,197,199,673,..." (End)
From Andrew Carter (acarter09(AT)newarka.edu), Dec 16 2008: (Start)
If "when starting at 2n+1" in the definition were replaced by "when starting at n", all even-indexed terms except for a(2) and a(4) would be -1.
A simple proof is that an even number's smallest nontrivial divisor is 2, and the result of iterating f for any even number except for 2 and 4 would have factors in front, so the resulting number would be of the form 10m+2 where m is an integer greater than 1, and therefore an even number ending in 2 other than two itself, so no prime would ever be reached. (End)

Examples

			n = 13: 2n+1 = 27 has nontrivial divisors 3 and 9, so we get 93, which has proper divisors 3 and 31, so we get 313, prime. So a(13) = 313.
		

Crossrefs

Extensions

Edited by Michel Marcus, Mar 09 2023

A130142 Let f denote the map that replaces k with the concatenation of its nontrivial divisors, written in decreasing order, each divisor being written in base 10 with its digits in reverse order. Then a(n) = first prime reached when starting at 2n+1 and iterating f.

Original entry on oeis.org

1, 3, 5, 7, 3, 11, 13, 53, 17, 19, 73, 23, 5, 9343, 29, 31, 113, -1, 37, 313, 41, 43
Offset: 0

Views

Author

Adam L. Buchsbaum (alb(AT)research.att.com), Jul 30 2007, Aug 01 2007

Keywords

Comments

If 2n+1 is 1 or a prime, set a(n) = 2n+1. If no prime is ever reached, set a(n) = -1.
The value of a(17) is currently unknown.

Examples

			n = 13: 2n+1 = 27 has nontrivial divisors 3 and 9, so we get 93, which has proper divisors 3 and 31, so we get 133.
Then 133 has nontrivial divisors 7 and 19, so we get 917.
Then 917 has nontrivial divisors 7 and 131, so we get 1317.
Then 1317 has nontrivial divisors 3 and 439, so we get 9343, a prime and a(13) = 9343.
From _Sean A. Irvine_, Sep 11 2009: (Start)
Proof chain for a(17). The following gives the argument to f at each step, followed by its factorization.
35 factors as 5 * 7.
75 has factors 3 * 5 * 5.
525153 has factors 3 * 193 * 907.
15057112727099753913 has factors 3 * 4463 * 17215189 * 65325353.
179719996575730910515106159846737337176838928854211713151146478934050745192125561494032705883138679506795913535235676554615981512719833136443 has factors 29 * 29 * 5546454298803948416569 * 8370112457804191610629 * 13338101723922940394396774098231 * 345111672681489292530961043464303237918570147336150469919363833
765...4892 (3249 digits) is divisible by 2, and hence all subsequent steps will be divisible by 2, therefore no prime is ever reached, therefore a(17)=-1. (End)
		

Crossrefs

Extensions

5 more terms (details for a(17) in example). Next term requires factoring a 1478-digit number. - Sean A. Irvine, Sep 11 2009
Edited by Michel Marcus, Mar 09 2023

A361320 If n is composite, replace n with the concatenation of its nontrivial divisors, written in increasing order, each divisor being written in base 10 with its digits in reverse order, otherwise a(n) = n.

Original entry on oeis.org

1, 2, 3, 2, 5, 23, 7, 24, 3, 25, 11, 2346, 13, 27, 35, 248, 17, 2369, 19, 24501, 37, 211, 23, 2346821, 5, 231, 39, 24741, 29, 23560151, 31, 24861, 311, 271, 57, 234692181, 37, 291, 331, 24580102, 41, 23674112, 43, 241122, 35951, 232, 47, 23468216142, 7, 250152
Offset: 1

Views

Author

Tyler Busby, Mar 09 2023

Keywords

Comments

First differs from A037279 at a(20).

Examples

			Divisors of 20 are 1,2,4,5,10,20, so a(20)=24501.
		

Crossrefs

Programs

  • PARI
    a(n) = if (isprime(n) || (n==1), return (n)); my(d=divisors(n), list=List()); for (i=2, #d-1, my(dd=digits(d[i])); forstep (j=#dd, 1, -1, listput(list, dd[j]))); fromdigits(Vec(list)); \\ Michel Marcus, Mar 09 2023
Showing 1-6 of 6 results.