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

A120713 Primes arising in A120712.

Original entry on oeis.org

2, 23, 3, 37, 211, 5, 311, 313, 223, 7, 317, 23691827, 229, 236132639, 241, 331, 391133, 337, 523, 11, 719, 347, 271, 372149, 391751, 2711142277, 353, 236918275481, 283, 13, 236295887, 359, 236316293, 1117, 379212763, 367, 541
Offset: 1

Views

Author

Eric Angelini, Jul 19 2007

Keywords

Crossrefs

A037279 If n is composite, replace n with the concatenation of its nontrivial divisors, 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, 24510, 37, 211, 23, 2346812, 5, 213, 39, 24714, 29, 23561015, 31, 24816, 311, 217, 57, 234691218, 37, 219, 313, 24581020, 41, 23671421, 43, 241122, 35915, 223, 47, 23468121624, 7
Offset: 1

Views

Author

Keywords

Examples

			Divisors of 12 are 1,2,3,4,6,12, so a(12)=2346.
		

Crossrefs

Programs

  • Maple
    A037279 := proc(n) local dvs ; if isprime(n) or n = 1 then n; else dvs := [op(numtheory[divisors](n) minus {1,n} )] ; dvs := sort(dvs) ; cat(op(dvs)) ; fi ; end: seq(A037279(n),n=1..80) ; # R. J. Mathar, Jul 23 2007
  • Mathematica
    f[n_]:=If[PrimeQ[n],n,FromDigits[Flatten[IntegerDigits/@Rest[ Most[ Divisors[n]]]]]]; Join[{1},Array[f,50,2]] (* Harvey P. Dale, Sep 24 2012 *)

Extensions

More terms from Erich Friedman
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar

A106708 a(n) is the concatenation of its nontrivial divisors.

Original entry on oeis.org

0, 0, 0, 2, 0, 23, 0, 24, 3, 25, 0, 2346, 0, 27, 35, 248, 0, 2369, 0, 24510, 37, 211, 0, 2346812, 5, 213, 39, 24714, 0, 23561015, 0, 24816, 311, 217, 57, 234691218, 0, 219, 313, 24581020, 0, 23671421, 0, 241122, 35915, 223, 0, 23468121624, 7, 251025, 317
Offset: 1

Views

Author

N. J. A. Sloane, Jul 20 2007

Keywords

Crossrefs

Cf. A037278, A120712, A037279, A131983 (records), A131984 (where records occur).

Programs

  • Haskell
    a106708 1           = 0
    a106708 n
       | a010051 n == 1 = 0
       | otherwise = read $ concat $ (map show) $ init $ tail $ a027750_row n
    -- Reinhard Zumkeller, May 01 2012
    
  • Maple
    A106708 := proc(n) local dvs ; if isprime(n) or n = 1 then 0; else dvs := [op(numtheory[divisors](n) minus {1,n} )] ; dvs := sort(dvs) ; cat(op(dvs)) ; fi ; end: seq(A106708(n),n=1..80) ; # R. J. Mathar, Aug 01 2007
  • Mathematica
    Table[If[CompositeQ[n],FromDigits[Flatten[IntegerDigits/@Rest[ Most[ Divisors[ n]]]]],0],{n,60}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 22 2020 *)
  • PARI
    {map(n) = local(d); d=divisors(n); if(#d<3, 0, d[1]=""; eval(concat(vecextract(d, concat("..", #d-1)))))}
    for(n=1,51,print1(map(n),",")) /* Klaus Brockhaus, Aug 05 2007 */
    
  • Python
    from sympy import divisors
    def a(n):
      nontrivial_divisors = [d for d in divisors(n)[1:-1]]
      if len(nontrivial_divisors) == 0: return 0
      else: return int("".join(str(d) for d in nontrivial_divisors))
    print([a(n) for n in range(1, 52)]) # Michael S. Branicky, Dec 31 2020

Formula

a(n) = A037279(n) * A010051(n). - R. J. Mathar, Aug 01 2007

Extensions

More terms from R. J. Mathar and Klaus Brockhaus, Aug 01 2007
Name edited by Michael S. Branicky, Dec 31 2020

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

A130846 Replace n with the concatenation of its anti-divisors.

Original entry on oeis.org

2, 3, 23, 4, 235, 35, 26, 347, 237, 58, 2359, 349, 2610, 311, 235711, 45712, 2313, 3813, 2614, 345915, 235915, 716, 2371017, 3417, 2561118, 3581119, 2319, 41220, 237921, 35791321, 2561322, 3423, 23101423, 824, 2351525, 3457111525, 2671126, 391627
Offset: 3

Views

Author

Jonathan Vos Post, Jul 20 2007, Jul 22 2007

Keywords

Comments

Number of anti-divisors concatenated to form a(n) is A066272(n). We may consider prime values of the concatenated anti-divisor sequence and we may iterate it, i.e. n, a(n), a(a(n)), a(a(a(n))) which leads to questions of trajectory, cycles, fixed points.
See A066272 for definition of anti-divisor.
Primes in this sequence are at n=3,4,5,10,14,16,40,46,100,145,149,... - R. J. Mathar, Jul 24 2007

Examples

			3: 2, so a(3) = 2.
4: 3, so a(4) = 3.
5: 2, 3, so a(5) = 23.
6: 4, so a(6) = 4.
7: 2, 3, 5, so a(7) = 235.
17: 2, 3, 5, 7, 11, so a(17) = 235711
		

Crossrefs

Programs

  • Maple
    antiDivs := proc(n) local resul,odd2n,r ; resul := {} ; for r in ( numtheory[divisors](2*n-1) union numtheory[divisors](2*n+1) ) do if n mod r <> 0 and r> 1 and r < n then resul := resul union {r} ; fi ; od ; odd2n := numtheory[divisors](2*n) ; for r in odd2n do if ( r mod 2 = 1) and r > 2 then resul := resul union {2*n/r} ; fi ; od ; RETURN(resul) ; end: A130846 := proc(n) cat(op(antiDivs(n))) ; end: seq(A130846(n),n=3..80) ; # R. J. Mathar, Jul 24 2007
  • Python
    from sympy.ntheory.factor_ import antidivisors
    def A130846(n): return int(''.join(str(s) for s in antidivisors(n))) # Chai Wah Wu, Dec 08 2021

Extensions

More terms from R. J. Mathar, Jul 24 2007

A191647 Numbers n with property that the concatenation of their anti-divisors is a prime.

Original entry on oeis.org

3, 4, 5, 10, 14, 16, 40, 46, 100, 145, 149, 251, 340, 373, 406, 424, 439, 466, 539, 556, 571, 575, 617, 619, 628, 629, 655, 676, 689, 724, 760, 779, 794, 899, 901, 941, 970, 989, 1019, 1055, 1070, 1076, 1183, 1213, 1226, 1231, 1258, 1270, 1285, 1331, 1340
Offset: 1

Views

Author

Paolo P. Lava, Jun 10 2011

Keywords

Comments

Similar to A120712 which uses the proper divisors of n.

Examples

			The anti-divisors of 40 are 3, 9, 16, 27, and 391627 is prime, hence 40 is in the sequence.
		

Crossrefs

Programs

  • Maple
    P:=proc(i) local a,b,c,d,k,n,s,v; v:=array(1..200000);
    for n from 3 by 1 to i do k:=2; b:=0;
    while k0 and (2*n mod k)=0 then b:=b+1; v[b]:=k; fi;
         else
         if (n mod k)>0 and (((2*n-1) mod k)=0 or ((2*n+1) mod k)=0) then
    b:=b+1; v[b]:=k; fi; fi; k:=k+1; od; a:=v[1];
    for s from 2 to b do a:=a*10^floor(1+evalf(log10(v[s])))+v[s]; od;
    if isprime(a) then print(n); fi;
    od; end: P(10^6);
  • Mathematica
    antiDivisors[n_Integer] := Cases[Range[2, n - 1], _?(Abs[Mod[n, #] - #/2] < 1 &)]; a191647[n_Integer] := Select[Range[n],
    PrimeQ[FromDigits[Flatten[IntegerDigits /@ antiDivisors[#]]]] &]; a191647[1350] (* Michael De Vlieger, Aug 09 2014, "antiDivisors" after Harvey P. Dale at A066272 *)
  • Python
    from sympy import isprime
    [n for n in range(3,10**4) if isprime(int(''.join([str(d) for d in range(2,n) if n%d and 2*n%d in [d-1,0,1]])))] # Chai Wah Wu, Aug 08 2014

Extensions

a(618) corrected in b-file by Paolo P. Lava, Feb 28 2018

A191859 The primes created by concatenation of anti-divisors in A191647.

Original entry on oeis.org

2, 3, 23, 347, 349, 311, 391627, 3471331, 384067, 2310175897, 239111323273399, 23167, 3784097136227, 235983149249, 3428116271, 37111677121283, 23293, 3471949133311, 231314228398154359, 378112153101159371, 2379127163381
Offset: 1

Views

Author

Klaus Brockhaus, Jun 18 2011

Keywords

Comments

a(n) is the concatenation of the anti-divisors of A191647(n).

Examples

			A191647(6) = 16, the anti-divisors of 16 are 3, 11. Hence a(6) = 311.
A191647(8) = 46, the anti-divisors of 46 are 3, 4, 7, 13, 31. Hence a(8) = 3471331.
		

Crossrefs

Programs

  • Magma
    Antidivisors:=func< n | [ d: d in [2..n-1] | n mod d ne 0 and ( (IsEven(d) and 2*n mod d eq 0) or (IsOdd(d) and ((2*n-1) mod d eq 0 or (2*n+1) mod d eq 0)) ) ] >; CAD:=function(n); A:=Antidivisors(n); S:=[]; for k in [1..#A] do S:= Intseq(A[k]) cat S; end for; p:=Seqint(S); return p; end function; A191859List:=func< m | [ p: n in [1..m] | IsPrime(p) where p is CAD(n) ] >; A191859List(600);

A166733 Numbers n with the property that the concatenation of the trivial divisors of n (i.e., 1 and n) is a prime.

Original entry on oeis.org

3, 7, 9, 13, 27, 31, 37, 39, 49, 51, 57, 63, 67, 73, 79, 81, 91, 93, 97, 99, 103, 109, 117, 123, 129, 151, 153, 163, 171, 181, 187, 193, 201, 213, 217, 223, 229, 231, 237, 249, 259, 277, 279, 283, 289, 291, 297, 301, 303, 307, 319, 321, 327, 361, 367, 373, 381
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 20 2009

Keywords

Comments

Essentially the same as A032664. - R. J. Mathar, Oct 23 2009

Examples

			3 -> 13; 7 -> 17; 9 -> 19; 13 -> 113.
		

Crossrefs

Cf. A120712.

Extensions

Edited by Charles R Greathouse IV, Apr 24 2010
Showing 1-8 of 8 results.