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.

Previous Showing 11-20 of 20 results.

A039652 Becomes prime after n iterations of f(x) = phi(x)+1 (least inverse of A039651).

Original entry on oeis.org

2, 1, 15, 35, 69, 255, 535, 949, 1957, 2513, 2923, 4531, 17701, 22957, 54589, 79421, 80029, 84493, 98581, 102827, 115243, 239111, 291149, 310813, 362621, 398893, 598341, 801923, 838307, 1063493, 1079833, 1123813, 1311121, 1329403, 1582439
Offset: 0

Views

Author

Keywords

Comments

Of the terms n <= 66, all are semiprimes except those for n = 0, 1, 5, and 19. Why? - T. D. Noe, Oct 17 2013

Crossrefs

Programs

  • Mathematica
    nn = 34; t = Table[0, {nn}]; found = 0; n = 0; While[found < nn, n++; len = Length[NestWhileList[EulerPhi[#] + 1 &, n, UnsameQ, All]] - 2; If[len <= nn && t[[len]] == 0, t[[len]] = n; found++]]; t = Join[{2}, t] (* T. D. Noe, Oct 17 2013 *)

A039656 Becomes prime after n iterations of f(x) = sigma(x)-1 (least inverse of A039655).

Original entry on oeis.org

2, 6, 4, 27, 12, 9, 121, 301, 930, 484, 578, 441, 1273, 468, 4863, 3171, 9216, 8373, 19692, 19416, 25442, 13440, 19230, 16641, 16804, 83161, 100652, 226181, 203400, 133200, 419248, 380979, 744796, 553296, 634710, 539476, 505584, 674416, 634206
Offset: 0

Views

Author

Keywords

Comments

Records: 2, 6, 27, 121, 301, 930, 1273, 4863, 9216, 19692, 25442, 83161, 100652, 226181, 419248, 744796, 3739690, 4238314, etc. - Robert G. Wilson v, Sep 23 2017
Indices of records: 0, 1, 3, 6, 7, 8, 12, 14, 16, 18, 20, 25, 26, 27, 30, 32, 46, 47, 48, 49, 50, 56, 57, 58, 59, 61, 63, 65, 67, 76, 77, 78, 82, 83, 84, 85, etc. - Robert G. Wilson v, Sep 23 2017
Checked through a(138)=60780636903. - Hugo Pfoertner, Nov 15 2017

Crossrefs

Programs

A291301 a(n) = prime that is eventually reached when x -> sigma(x)-1 is repeatedly applied to the product of the first n primes, or -1 if no prime is ever reached.

Original entry on oeis.org

2, 11, 71, 743, 6911, 117239, 2013983, 34836479, 921086711, 33596203871, 18754852859999, 1306753691335679, 2795529813471359, 200489563747397471, 7143750592470475271, 146095655504943513599, 161739770170976834876927, 543475838478389870591999, 317180662337566737324195839
Offset: 1

Views

Author

N. J. A. Sloane, Aug 31 2017

Keywords

Comments

A subsequence of A039654.

Examples

			2*3*5*7*11*13 = 30030 -> 96767 -> 111359 -> 117239 takes three steps to reach a prime, so a(6) = 117239.
		

Crossrefs

Cf. A039654, A000203, A002110, A291302 (number of steps).

Programs

  • Mathematica
    p[n_]:=Times@@Prime/@Range[n]; f[n_]:=DivisorSigma[1,n]-1;
    a[n_]:=Last[NestWhileList[f,p[n],CompositeQ]]; a/@Range[20] (* Ivan N. Ianakiev, Sep 01 2017 *)
  • Python
    from sympy import primorial, isprime, divisor_sigma
    def A291301(n):
        m = primorial(n)
        while not isprime(m):
            m = divisor_sigma(m) - 1
        return m # Chai Wah Wu, Aug 31 2017

Extensions

a(10)-a(19) from Chai Wah Wu, Aug 31 2017

A291302 a(n) = number of steps to reach a prime when x -> sigma(x)-1 is repeatedly applied to the product of the first n primes, or -1 if no prime is ever reached.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 3, 1, 3, 4, 46, 57, 7, 9, 17, 1, 45, 1, 33, 8, 10, 4, 3, 32, 6, 47, 17, 21, 41, 17, 12, 11, 10, 31, 74, 25, 99, 11
Offset: 1

Views

Author

N. J. A. Sloane, Aug 31 2017

Keywords

Examples

			2*3*5*7*11*13 = 30030 -> 96767 -> 111359 -> 117239 takes three steps to reach a prime, so a(6) = 3.
		

Crossrefs

Cf. A039654, A039653, A291301 (the prime reached).

Programs

  • Maple
    A291302 := proc(n)
        local a,x ;
        a := 0 ;
        x := mul(ithprime(i),i=1..n) ;
        while not isprime(x) do
            x := numtheory[sigma](x)-1 ;
            a := a+1 ;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 12 2017
  • Mathematica
    p[n_]:=Times@@Prime/@Range[n];f[n_]:=DivisorSigma[1,n]-1;
    a[n_]:=Length[NestWhileList[f,p[n],CompositeQ]]-1;a/@Range[34] (* Ivan N. Ianakiev, Sep 01 2017 *)
  • Python
    from sympy import primorial, isprime, divisor_sigma
    def A291302(n):
        m, c = primorial(n), 0
        while not isprime(m):
            m = divisor_sigma(m) - 1
            c += 1
        return c # Chai Wah Wu, Aug 31 2017

Extensions

a(11)-a(35) from Chai Wah Wu, Aug 31 2017
a(36)-a(38) from Ivan N. Ianakiev, Sep 01 2017

A292114 List of numbers n such that A039655(n) reaches a new record high.

Original entry on oeis.org

2, 4, 9, 121, 301, 441, 468, 3171, 8373, 13440, 16641, 16804, 83161, 100652, 133200, 367428, 395640, 459680, 701823, 3739690, 4238314, 6698616, 9014248, 12301860, 16956850, 22230514, 54889200, 60676144, 84983056, 116648892, 128942664
Offset: 1

Views

Author

N. J. A. Sloane, Sep 22 2017

Keywords

Comments

Naively, one might have expected these numbers to have some other distinguishing property (primorials, perhaps), but that seems not to be the case.
Increasingly many of the values are of the form m*p with a (large) prime p and a smooth m, often m = 2^k (for a(n), n = 12, 14, 21, 23, 26, 28, 29, ...) or m = 2^k*3^k' (n = 7, 9, 19, 22, 30, ...) or m = 2^k*5^k' (n = 20, 25, ...). I conjecture that almost all terms are even. Also, for most terms (n = 1, 2, 3, 4, 5, 7, 10, 12, 14, 15, 16, 17, 19, 20, 21, 23, 24, 25, 26, 29, 30, 31, ...), either a(n)-1 or a(n)+1 has at most 2 prime divisors. - M. F. Hasler, Sep 25 2017

Crossrefs

Programs

Extensions

More terms from Hugo Pfoertner, Sep 22 2017

A323075 The fixed point reached when map x -> 1+(x-(largest divisor d < x)) is iterated, starting from x = n.

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 7, 5, 7, 3, 11, 7, 13, 5, 11, 7, 17, 3, 19, 11, 11, 7, 23, 13, 11, 5, 19, 11, 29, 7, 31, 17, 23, 3, 29, 19, 37, 11, 19, 11, 41, 7, 43, 23, 31, 13, 47, 11, 43, 5, 29, 19, 53, 11, 31, 29, 19, 7, 59, 31, 61, 17, 43, 23, 53, 3, 67, 29, 47, 19, 71, 37, 73, 11, 29, 19, 67, 11, 79, 41, 31, 7, 83, 43, 47, 23, 59, 31, 89, 13
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

After a(1) = 1, the fixed point reached is always a prime. Question: Do all odd primes occur infinitely often?
Yes. All odd primes occur infinitely often. A060681(2*k) = k + 1 and so for each k > 1 there exists an integer m such that a(m) = p where p is an odd prime. - David A. Corneth, Jan 07 2019

Crossrefs

Cf. A000040, A000079, A000918, A060681, A323076, A323079, A323164, A323165 (ordinal transform).
Cf. also A039650, A039654.

Programs

  • Mathematica
    {1}~Join~Array[FixedPoint[1 + (# - Divisors[#][[-2]]) &, #] &, 89, 2] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A060681(n) = (n-if(1==n,n,n/vecmin(factor(n)[,1])));
    A323075(n) = { my(nn = 1+A060681(n)); if(nn==n,n,A323075(nn)); };

Formula

If n == (1+A060681(n)), then a(n) = n, otherwise a(n) = a(1+A060681(n)).
a(2^k * p - 2^(k+1) + 2) = a(A000079(k) * p - A000918(k+1)) = p for k >= 0. - David A. Corneth, Jan 08 2019
a(1) = 1, and for n > 1, a(n) = A000040(A323164(n)). - Antti Karttunen, Jan 08 2019

A291776 a(n) = prime that is eventually reached when x -> sigma(x)-1 is repeatedly applied to 2^n-1, or -1 if no prime is ever reached.

Original entry on oeis.org

3, 7, 23, 31, 103, 127, 431, 911, 1847, 6719, 10487, 8191, 56999, 41399, 135647, 131071, 560159, 524287, 1999871, 3982271, 5909759, 17512991, 46092239, 46335599, 164460119, 186592247, 736727807, 3926707199, 4146049487, 2147483647, 8994904463, 11132323439
Offset: 2

Views

Author

N. J. A. Sloane, Aug 31 2017

Keywords

Examples

			For n=9, 2^n-1 = 511 with iterates 511->591->791->911, and 911 is the first prime, so a(7)=911.
		

Crossrefs

Programs

  • PARI
    P(x) = {for(c=0,10^6,if(isprime(x),return(x),x=sigma(x)-1));-1}
    vector(200,n,P(2^(n+1)-1)) \\ Lars Blomberg, Sep 01 2017

Extensions

Added a(7) and a(13)-a(33) from Lars Blomberg, Sep 01 2017

A291777 a(n) = number of steps to reach a prime when x -> sigma(x)-1 is repeatedly applied to 2^n-1, or -1 if no prime is ever reached.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 3, 2, 9, 2, 0, 7, 3, 4, 0, 2, 0, 1, 4, 1, 4, 2, 3, 4, 2, 12, 22, 8, 0, 3, 3, 4, 3, 1, 2, 2, 3, 3, 4, 3, 13, 2, 16, 3, 8, 3, 14, 17, 9, 37, 4, 7, 4, 7, 11, 4, 3, 14, 0, 14, 8, 1, 6, 8, 73, 26, 10, 1, 32, 6, 10, 2, 6, 2, 33, 2, 4, 52, 12, 16
Offset: 2

Views

Author

N. J. A. Sloane, Aug 31 2017

Keywords

Examples

			For n=9, 2^n-1 = 511 with iterates 511->591->791->911, and 911 is the first prime, so a(7)=3.
		

Crossrefs

Programs

  • PARI
    C(x) = {for(c=0,10^5,if(isprime(x),return(c),x=sigma(x)-1));-1}
    vector(200,n,C(2^(n+1)-1)) \\ Lars Blomberg, Sep 01 2017

Extensions

a(13)-a(82) from Lars Blomberg, Sep 01 2017

A292115 Records in A039655.

Original entry on oeis.org

0, 2, 5, 6, 7, 11, 13, 15, 17, 21, 23, 24, 25, 26, 29, 40, 42, 44, 45, 46, 47, 54, 55, 56, 57, 58, 60, 64, 66, 72, 74, 75, 76, 79, 80, 81, 100, 104, 107, 117, 119, 120, 127, 128, 131, 134, 135, 137, 138
Offset: 1

Views

Author

Hugo Pfoertner and N. J. A. Sloane, Sep 22 2017

Keywords

Crossrefs

A291293 Sequence mod 5 defined by Baldini-Eschgfäller coupled dynamical system (f,lambda,alpha) with f(k) = A000203(k)-1, lambda(y) = 3y+2 mod 5 for y in Y = {0,1,2,3,4}, and alpha(k) = k mod 5 for k in Omega = {primes}.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 30 2017

Keywords

Comments

This sequence assumes that the Erdos conjecture is true, that iterating k -> sigma(k)-1 always reaches a prime (cf. A039654).

Crossrefs

Formula

Let f(k) = A000203(k)-1 = sigma(k) - 1, lambda(y) = 3y+2 mod 5 for y in Y = {0,1,2,3,4}, and alpha(k) = k mod 5 for k in Omega = {primes}. Here sigma is the sum of divisors function A000203.
Then a(n) for n >= 2 is defined by a(n) = alpha(n) if n in Omega, and otherwise by a(n) = lambda(a(f(n))).
Previous Showing 11-20 of 20 results.