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

A118756 a(n) = smallest prime p such that p is the home prime (cf. A037274) of exactly n natural numbers.

Original entry on oeis.org

2, 23, 211, 379, 773, 3389, 23251, 3761, 178069, 77773, 379811, 378997, 747521, 2337691, 3789293, 3574657
Offset: 1

Views

Author

William Lindgren (william.lindgren(AT)sru.edu), Sep 04 2007, corrected Sep 15 2007

Keywords

Comments

a(17) > 10^7, a(18) = 3784463. - Robert G. Wilson v, Oct 01 2007

Examples

			23 is the home prime of both 6 and 23, thus a(2) = 23; 211 is the home prime of 4, 22 and 211, thus a(3) = 211.
More compactly: (2) -> 2, (6,23) -> 23, (4,22,211) -> 211,
(42,74,237,379) -> 379, (10,25,55,511,773) -> 773,
(118, 259, 737, 801, 1167, 3389) -> 3389,
{250, 1506, 2555, 3865, 5773, 6502, 23251} -> 23251,
{140, 332, 514, 566, 1281, 2257, 2283, 3761} -> 3761,
{4206, 7402, 10786, 16123, 23701, 25393, 67379, 137173, 178069} -> 178069,
{3786, 7262, 10078, 14513, 18417, 23631, 25039, 32449, 37877, 77773} -> 77773,
{41933, 50161, 56598, 103487, 192207, 206031, 216959, 239433, 307369, 363007, 379811} -> 379811,
{1798, 5982, 22931, 23997, 41315, 53033, 58263, 181293, 184102, 292051, 319421, 378997} -> 378997,
{722, 4938, 5718, 7646, 18929, 21919, 23823, 23953, 91277, 97941, 171409, 332647, 747521} -> 747521,
{87066, 128055, 138438, 153402, 175611, 226146, 358537, 465734, 588041, 675382, 866893, 1792003, 1564051, 2337691} -> 2337691,
{8691, 9725, 23585, 31437, 32897, 55389, 67491, 144995, 168163, 337499, 547617, 964849, 1875153, 3303841, 3789293} -> 3789293,
{5978, 10654, 27761, 40307, 47985, 111855, 156657, 172371, 202881, 250519, 357457, 379661, 407507, 488985, 1723971, 3574657} -> 3574657, etc. - _Robert G. Wilson v_, Oct 01 2007
		

Crossrefs

Programs

  • Mathematica
    lst = {}; f[n_] := FromDigits@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@n, 2]; h[n_] := NestWhileList[f@# &, n, !PrimeQ@# &, 1, 28]; Do[p = h[n][[ -1]]; If[ PrimeQ@p && p < 10^7 && p != n, Print[{n, p}]; AppendTo[lst, p]], {n, 2, 10^7}];
    lst = Sort@ lst; Table[d = n - 2; lsu = {}; Do[If[lst[[n]] == lst[[n + d]] && lst[[n - 1]] != lst[[n]] && lst[[n]] != lst[[n + d + 1]], AppendTo[lsu, lst[[n]] ]], {n, 188004 - d - 1}]; First@ Union@ lsu, {n, 3, 16}] (* Robert G. Wilson v, Oct 01 2007 *)

Formula

a(n) = A037274(A215408(n)). - Jonathan Sondow, Aug 09 2012

Extensions

a(7)-a(16) from Robert G. Wilson v, Sep 27 2007, Oct 01 2007

A133957 Form the list of home primes A037274(c) for c composite, and sort into increasing order.

Original entry on oeis.org

23, 37, 211, 223, 227, 229, 233, 241, 257, 271, 277, 283, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397, 523, 541, 547, 557, 571, 577, 719, 743, 761, 773, 797, 1117, 1123, 1129, 1153, 1171, 1319, 1361, 1367, 1373, 1723, 1741, 1747
Offset: 1

Views

Author

Robert G. Wilson v, Sep 30 2007

Keywords

Comments

The old name was "Home primes the result of composite numbers."
Number of terms < 10^n: 0, 2, 37, 274, 2087, 15472, 123261, ....
Increasing sequence of all prime numbers which are concatenations of at least two primes ordered in nondecreasing order (e.g., 227=2.2.7, 1319=13.19). - Bartlomiej Pawlik, Aug 06 2023

Examples

			The home primes corresponding to the first few composite numbers c are as follows:
   c            A037274(c)
   4            211
   6            23
   8            3331113965338635107
   9            311
   10           773
   12           223
   14           13367
   15           1129
   16           31636373
   18           233
   20           3318308475676071413
   21           37
   ...          ...
		

Crossrefs

Programs

  • Mathematica
    lst = {}; f[n_] := FromDigits@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@n, 2]; h[n_] := NestWhileList[f@# &, n, !PrimeQ@# &, 1, 28]; Do[p = h[n][[ -1]]; If[ PrimeQ@p && p < 10^7 && p != n, Print[{n, p}]; AppendTo[lst, p]], {n, 2, 1000}]; Union@ lst

Extensions

Entry revised by N. J. A. Sloane, Mar 24 2021

A037275 Subsequence of record holders in A037274.

Original entry on oeis.org

1, 2, 3, 211, 3331113965338635107, 6161791591356884791277
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

De Geest's web site has many more terms.

A238579 Home prime sequence (see A037274) starting at 146.

Original entry on oeis.org

146, 273, 3713, 4779, 333359, 1325643, 3111717139, 29177760383, 69142225413, 3471134339561, 7980350584141, 1324115101168677, 33147123900129853, 1941131324815763997, 37816317113233982621, 291304010934939102849, 333777134924210136703397, 7409854792211363875345439
Offset: 1

Views

Author

J. Lowell, Mar 30 2014

Keywords

Comments

Second sequence of this kind with as yet unknown trajectory (see A037274, A056938). - J. Lowell, Apr 27 2017

Examples

			146 = 2*73 so next term is 273; 273 = 3*7*13 so next term is 3713.
		

Crossrefs

Cf. A037274 (home primes), A056938.

Programs

  • Mathematica
    NestList[FromDigits@ Flatten@ Map[IntegerDigits, FactorInteger[#] /. {p_, e_} /; p >= 1 :> If[p == 1, 1, ConstantArray[p, e]]] &, 146, 17] (* Michael De Vlieger, Apr 27 2017 *)
  • PARI
    lista(nn) = {n = 146; for (i=1 , nn, print1(n, ", "); f = factor(n); s = ""; for (j=1, #f~, for (k=1, f[j, 2], s = concat(s, Str(f[j, 1])););); n = eval(s););} \\ Michel Marcus, Mar 31 2014

Extensions

One more term added by J. Lowell, Mar 30 2014
More terms from Jon E. Schoenfield, Mar 30 2014
One further term from N. J. A. Sloane, Mar 31 2014

A215408 Smallest number whose home prime (cf. A037274) is the home prime of exactly n natural numbers.

Original entry on oeis.org

2, 6, 4, 42, 10, 118, 250, 140, 4206, 3786, 41933, 1798, 722, 87066, 8691, 5978
Offset: 1

Views

Author

Jonathan Sondow, Aug 09 2012

Keywords

Comments

The home primes of the sequence are A118756.

Examples

			The home prime of the four numbers 42, 74, 237, and 379 is 379 (for example, 42 = 2*3*7 -> 237 = 3*79 -> 379 which is prime), so a(4) = 42.
		

References

  • J. Heleen, Family Numbers: Constructing Primes By Prime Factor Splicing, J. Rec. Math. 28 (1996-97), 116-119.

Crossrefs

Cf. A037274, A118756, and their cross-references.

Formula

A037274(a(n)) = A118756(n).

A037276 Start with 1; for n>1, replace n with the concatenation of its prime factors in increasing order.

Original entry on oeis.org

1, 2, 3, 22, 5, 23, 7, 222, 33, 25, 11, 223, 13, 27, 35, 2222, 17, 233, 19, 225, 37, 211, 23, 2223, 55, 213, 333, 227, 29, 235, 31, 22222, 311, 217, 57, 2233, 37, 219, 313, 2225, 41, 237, 43, 2211, 335, 223, 47, 22223, 77, 255, 317, 2213, 53, 2333
Offset: 1

Views

Author

Keywords

Examples

			If n = 2^3*5^5*11^2 = 3025000, a(n) = 222555551111 (n=2*2*2*5*5*5*5*5*11*11, then remove the multiplication signs).
		

Crossrefs

Cf. A037274, A048985, A067599, A080670, A084796. Different from A073646.
Cf. also A027746, A289660 (a(n)-n).

Programs

  • Haskell
    a037276 = read . concatMap show . a027746_row
    -- Reinhard Zumkeller, Apr 03 2012
    
  • Maple
    # This is for n>1
    read("transforms") ;
    A037276 := proc(n)
        local L,p ;
        L := [] ;
        for p in ifactors(n)[2] do
            L := [op(L),seq(op(1,p),i=1..op(2,p))] ;
        end do:
        digcatL(L) ;
    end proc: # R. J. Mathar, Oct 29 2012
  • Mathematica
    co[n_, k_] := Nest[Flatten[IntegerDigits[{#, n}]] &, n, k - 1]; Table[FromDigits[Flatten[IntegerDigits[co @@@ FactorInteger[n]]]], {n, 54}] (* Jayanta Basu, Jul 04 2013 *)
    FromDigits@ Flatten@ IntegerDigits[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 54 (* Michael De Vlieger, Jul 14 2015 *)
  • PARI
    a(n)={ n<4 & return(n); for(i=1,#n=factor(n)~, n[1,i]=concat(vector(n[2,i],j,Str(n[1,i])))); eval(concat(n[1,]))}  \\ M. F. Hasler, Jun 19 2011
    
  • Python
    from sympy import factorint
    def a(n):
        f=factorint(n)
        l=sorted(f)
        return 1 if n==1 else int("".join(str(i)*f[i] for i in l))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017

A037273 Number of steps to reach a prime under "replace n with concatenation of its prime factors", or -1 if no prime is ever reached.

Original entry on oeis.org

-1, 0, 0, 2, 0, 1, 0, 13, 2, 4, 0, 1, 0, 5, 4, 4, 0, 1, 0, 15, 1, 1, 0, 2, 3, 4, 4, 1, 0, 2, 0, 2, 1, 5, 3, 2, 0, 2, 1, 9, 0, 2, 0, 9, 6, 1, 0, 15
Offset: 1

Views

Author

Keywords

Comments

Starting with 49, no prime has been reached after 79 steps.
a(49) > 118, see A056938 and FactorDB link. - Michael S. Branicky, Nov 19 2020

Examples

			13 is already prime, so a(13) = 0.
Starting with 14 we get 14 = 2*7, 27 = 3*3*3, 333 = 3*3*37, 3337 = 47*71, 4771 = 13*367, 13367 is prime; so a(14) = 5.
		

Crossrefs

Programs

  • Haskell
    a037273 1 = -1
    a037273 n = length $ takeWhile ((== 0) . a010051) $
       iterate (\x -> read $ concatMap show $ a027746_row x :: Integer) n
    -- Reinhard Zumkeller, Jan 08 2013
    
  • Mathematica
    nxt[n_] := FromDigits[Flatten[IntegerDigits/@Table[#[[1]], {#[[2]]}]&/@ FactorInteger[n]]]; Table[Length[NestWhileList[nxt, n, !PrimeQ[#]&]] - 1, {n, 48}] (* Harvey P. Dale, Jan 03 2013 *)
  • PARI
    row_a027746(n, o=[1])=if(n>1, concat(apply(t->vector(t[2], i, t[1]), Vec(factor(n)~))), o) \\ after M. F. Hasler in A027746
    tonum(vec) = my(s=""); for(k=1, #vec, s=concat(s, Str(vec[k]))); eval(s)
    a(n) = if(n==1, return(-1)); my(x=n, i=0); while(1, if(ispseudoprime(x), return(i)); x=tonum(row_a027746(x)); i++) \\ Felix Fröhlich, May 17 2021
    
  • Python
    from sympy import factorint
    def a(n):
        if n < 2: return -1
        klst, f = [n], sorted(factorint(n, multiple=True))
        while len(f) > 1:
            klst.append(int("".join(map(str, f))))
            f = sorted(factorint(klst[-1], multiple=True))
        return len(klst) - 1
    print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Aug 02 2021

Extensions

Edited by Charles R Greathouse IV, Apr 23 2010
a(1) = -1 by Reinhard Zumkeller, Jan 08 2013
Name edited by Felix Fröhlich, May 17 2021

A195264 Iterate x -> A080670(x) (replace x with the concatenation of the primes and exponents in its prime factorization) starting at n until reach 1 or a prime (which is then the value of a(n)); or a(n) = -1 if a prime is never reached.

Original entry on oeis.org

1, 2, 3, 211, 5, 23, 7, 23, 2213, 2213, 11, 223, 13, 311, 1129, 233, 17, 17137, 19
Offset: 1

Views

Author

N. J. A. Sloane, Sep 14 2011, based on discussions on the Sequence Fans Mailing List by Alonso del Arte, Franklin T. Adams-Watters, D. S. McNeil, Charles R Greathouse IV, Sean A. Irvine, and others

Keywords

Comments

J. H. Conway offered $1000 for a proof or disproof for his conjecture that every number eventually reaches a 1 or a prime - see OEIS50 link. - N. J. A. Sloane, Oct 15 2014
However, James Davis has discovered that a(13532385396179) = -1. This number D = 13532385396179 = (1407*10^5+1)*96179 = 13*53^2*3853*96179 is clearly fixed by the map x -> A080670(x), and so never reaches 1 or a prime. - Hans Havermann, Jun 05 2017
The number n = 3^6 * 2331961591220850480109739369 * 21313644799483579440006455257 is a near-miss for another nonprime fixed point. Unfortunately here the last two factors only look like primes (they have no prime divisors < 10), but in fact both are composite. - Robert Gerbicz, Jun 07 2017
The number D' = 13^532385396179 maps to D and so is a much larger number with a(D') = -1. Repeating this process (by finding a prime prefix of D') should lead to an infinite sequence of counterexamples to Conway's conjecture. - Hans Havermann, Jun 09 2017
The first 47 digits of D' form a prime P = 68971066936841703995076128866117893410448319579, so if Q denotes the remaining digits of 13^532385396179 then D'' = P^Q is another counterexample. - Robert Gerbicz, Jun 10 2017
This sequence is different from A037274. Here 8 = 2^3 -> 23 (a prime), whereas in A037274 8 = 2^3 -> 222 -> ... -> 3331113965338635107 (a prime). - N. J. A. Sloane, Oct 12 2014
The value of a(20) is presently unknown (see A195265).

Examples

			4 = 2^2 -> 22 =2*11 -> 211, prime, so a(4) = 211.
9 = 3^2 -> 32 = 2^5 -> 25 = 5^2 -> 52 = 2^2*13 -> 2213, prime, so a(9)=2213.
		

Crossrefs

A variant of the home primes, A037271. Cf. A080670, A195265 (trajectory of 20), A195266 (trajectory of 105), A230305, A084318. A230627 (base-2), A290329 (base-3)

Programs

  • Mathematica
    f[1] := 1; f[n_] := Block[{p = Flatten[FactorInteger[n]]}, k = Length[p]; While[k > 0, If[p[[k]] == 1, p = Delete[p, k]]; k--]; FromDigits[Flatten[IntegerDigits[p]]]]; Table[FixedPoint[f, n], {n, 19}] (* Alonso del Arte, based on the program for A080670, Sep 14 2011 *)
    fn[n_] := FromDigits[Flatten[IntegerDigits[DeleteCases[Flatten[
    FactorInteger[n]], 1]]]];
    Table[NestWhile[fn, n, # != 1 && ! PrimeQ[#] &], {n, 19}] (* Robert Price, Mar 15 2020 *)
  • PARI
    a(n)={n>1 && while(!ispseudoprime(n), n=A080670(n));n} \\ M. F. Hasler, Oct 12 2014

A037271 Number of steps to reach a prime under "replace n with concatenation of its prime factors" when applied to n-th composite number, or -1 if no such number exists.

Original entry on oeis.org

2, 1, 13, 2, 4, 1, 5, 4, 4, 1, 15, 1, 1, 2, 3, 4, 4, 1, 2, 2, 1, 5, 3, 2, 2, 1, 9, 2, 9, 6, 1, 15
Offset: 1

Views

Author

Keywords

Comments

a(33) is presently unknown: starting with 49, no prime has been reached after 110 steps. See A037274 for the latest information.

Examples

			Starting with 14 (the seventh composite number) we get 14=2*7, 27=3*3*3, 333=3*3*37, 3337=47*71, 4771=13*367, 13367 is prime; so a(7)=5.
		

Crossrefs

Programs

  • Haskell
    a037271 = length . takeWhile ((== 0) . a010051'') .
                                 iterate a037276 . a002808
    -- Reinhard Zumkeller, Apr 03 2012
  • Mathematica
    maxComposite = 49; maxIter = 40; concat[n_] := FromDigits[ Flatten[ IntegerDigits /@ Flatten[ Apply[ Table, {#[[1]], {#[[2]]}} & /@ FactorInteger[n], {1}]]]]; composites = Select[ Range[2, maxComposite], ! PrimeQ[#] &]; a[n_] := ( lst = NestWhileList[ concat, composites[[n]], ! PrimeQ[#] &, 1, maxIter]; If[PrimeQ[ Last[lst]], Length[lst] - 1, - 1]); Table[a[n], {n, 1, Length[composites]}] (* Jean-François Alcover, Jul 10 2012 *)

A133956 Complement of A133957.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 239, 251, 263, 269, 281, 293, 307, 349, 401, 409, 419, 421, 431, 433
Offset: 1

Views

Author

Robert G. Wilson v, Sep 30 2007

Keywords

Comments

Home primes whose homeliness is 1.
Number of terms < 10^n: Pi(10^n)- {0, 2, 37, 274, 2087, 15472, 76940, ...}.

Examples

			Only {2} -> 2, {3} -> 3, etc. Whereas {6 & 23} -> 23 thus 23 has a homeliness of 2 and therefore is not a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; f[n_] := FromDigits@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@n, 2]; h[n_] := NestWhileList[f@# &, n, !PrimeQ@# &, 1, 28]; Do[p = h[n][[ -1]]; If[ PrimeQ@p && p < 10^7 && p != n, Print[{n, p}]; AppendTo[lst, p]], {n, 2, 1000}];
    Complement[ Prime@ Range@ 100, {23, 37, 211, 223, 227, 229, 233, 241, 257, 271, 277, 283, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397, 523, 541}]
Showing 1-10 of 66 results. Next