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 31-40 of 54 results. Next

A261088 Number of steps needed to reach zero when starting from k = n^2 and repeatedly applying the map that replaces k with k - d(k), where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 10, 10, 19, 15, 19, 21, 24, 28, 39, 33, 53, 44, 49, 53, 60, 61, 69, 72, 79, 82, 92, 93, 117, 108, 115, 115, 140, 121, 174, 146, 205, 155, 233, 217, 267, 192, 295, 209, 225, 222, 238, 249, 267, 270, 299, 290, 336, 313, 373, 328, 411, 347, 451, 380, 486, 400, 534, 422, 447, 441, 460, 460, 511, 479, 496, 504, 545, 529, 602, 553, 579, 577, 626, 612, 681, 632, 747, 665, 796, 695
Offset: 0

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,n^2,#!= 0&]]-1;f/@Range[0,85] (* Ivan N. Ianakiev, Sep 25 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 2^25;
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]; if(!(i%65536),print1(i,", ")););
    A155043 = n -> if(!n,n,v155043[n]);
    A261088 = n -> A155043(n^2);
    for(n=0, 5792, write("b261088.txt", n, " ", A261088(n)));
    
  • Scheme
    (define (A261088 n) (A155043 (A000290 n)))

Formula

a(n) = A155043(A000290(n)) = A155043(n^2).

A261085 Number of steps needed to reach zero when starting from the n-th prime [i.e., setting k to A000040(n)] and repeatedly applying the map that replaces k with k - d(k), where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 6, 7, 8, 10, 11, 13, 14, 15, 15, 17, 19, 20, 22, 23, 24, 26, 16, 18, 20, 21, 22, 22, 23, 24, 23, 24, 25, 26, 28, 29, 31, 33, 33, 34, 36, 37, 39, 40, 40, 41, 44, 47, 34, 35, 49, 51, 52, 54, 54, 55, 57, 58, 59, 58, 59, 62, 48, 49, 50, 66, 69, 71, 73, 74, 74, 76, 55, 57, 59, 60, 61, 63, 63, 65, 68, 69, 71, 72, 74, 62, 64, 65, 66, 67, 67, 70, 72, 73, 75, 76, 77, 80, 81, 75, 77, 79, 79, 81
Offset: 1

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Examples

			For n=4 we have prime(4) = 7, from which we start subtracting the number of divisors, to get the following path: 7 - 2 = 5, 5 - 2 = 3, 3 - 2 = 1, 1 - 1 = 0, and we have reached zero in four steps, thus a(4) = 4.
For n=5 we have prime(5) = 11, for which the similar process results: 11 - 2 = 9, 9 - 3 = 6, 6 - 4 = 2, 2 - 2 = 0, and again we have reached zero in four steps, thus also a(5) = 4.
		

Crossrefs

Cf. A261086 (gives the positions of drops, i.e., where nonmonotonic) and A261087 (the corresponding primes).

Programs

  • Mathematica
    mpr[p_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,p,#>0&]]-1; mpr/@Prime[ Range[ 120]] (* Harvey P. Dale, Aug 18 2022 *)
  • PARI
    uplim = 65537;
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]);
    A155043 = n -> if(!n,n,v155043[n]);
    n=0; forprime(p=2, uplim, n++; write("b261085.txt", n, " ", A155043(p)));
    
  • Scheme
    (define (A261085 n) (A155043 (A000040 n)))

Formula

a(n) = A155043(A000040(n)).

A261103 a(n) = A259934(n) - A261089(n).

Original entry on oeis.org

0, 1, 3, 7, 11, 9, 13, 15, 19, 19, 25, 27, 27, 33, 37, 47, 43, 49, 49, 55, 57, 56, 58, 58, 71, 75, 83, 23, 25, 31, 35, 37, 49, 51, 49, 53, 57, 61, 65, 63, 77, 75, 79, 85, 87, 87, 91, 91, 99, 109, 109, 115, 117, 117, 123, 127, 127, 133, 139, 141, 141, 143, 149, 147, 159, 151, 157, 165, 167, 179, 187, 193, 205, 211, 213, 209, 215, 213, 75
Offset: 0

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Crossrefs

Programs

Formula

a(n) = A259934(n) - A261089(n).

A262677 Number of odd numbers encountered when iterating A049820 starting from n: a(0) = 0 and for n >= 1, a(n) = A000035(n) + a(A049820(n)).

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 0, 4, 1, 1, 0, 2, 0, 3, 0, 3, 2, 4, 0, 5, 0, 5, 0, 6, 2, 1, 0, 7, 0, 8, 0, 9, 0, 9, 0, 10, 7, 11, 0, 11, 0, 12, 0, 13, 0, 12, 0, 13, 0, 1, 0, 14, 0, 15, 0, 15, 0, 16, 0, 17, 0, 18, 0, 17, 16, 19, 0, 20, 0, 20, 0, 21, 0, 22, 0, 21, 0, 23, 0, 24, 0, 1, 0, 2, 0, 2, 0, 3, 0, 4, 0, 4, 0, 5, 0, 5, 0, 6, 0, 6, 4, 7, 0, 8, 0, 7, 0, 8
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

Number of odd numbers encountered before zero is reached when starting from k = n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005). This count includes n itself if it is odd.

Crossrefs

Formula

a(0) = 0; for n >= 1, a(n) = A000035(n) + a(A049820(n)).
Other identities. For all n >= 0:
A155043(n) = A262676(n) + a(n).

A263279 a(n) = A263259(A259934(n)); one-based position of A259934(n) at row n of table A263265.

Original entry on oeis.org

1, 2, 3, 5, 4, 5, 6, 4, 4, 3, 6, 3, 2, 4, 5, 6, 5, 5, 5, 7, 4, 4, 5, 6, 9, 6, 7, 5, 6, 4, 4, 3, 5, 5, 4, 5, 3, 3, 4, 4, 5, 5, 5, 5, 5, 4, 4, 3, 5, 7, 4, 4, 5, 7, 8, 5, 7, 5, 7, 8, 8, 6, 8, 6, 7, 7, 7, 9, 10, 10, 11, 9, 10, 9, 11, 10, 9, 7, 8, 9, 7, 6, 9, 8, 10, 6, 5, 6, 5, 9, 8, 8, 8, 7, 6, 4, 3, 3, 3, 5, 4, 7, 6, 6, 7, 9, 5, 5, 10, 10, 11, 6, 7, 9, 9, 7, 9, 13, 7, 6, 8
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2015

Keywords

Comments

a(n) gives the number of integers k <= A259934(n) for which A155043(k) = n = A155043(A259934(n)).

Crossrefs

Programs

Formula

a(n) = A263259(A259934(n)).

A322996 Number of iterations of A049820(x) = x - A000005(x) needed to reach an odd number or zero, when starting from x = n.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 3, 0, 4, 0, 1, 0, 4, 0, 5, 0, 5, 0, 2, 0, 6, 0, 6, 0, 6, 0, 7, 0, 7, 0, 1, 0, 8, 0, 8, 0, 8, 0, 9, 0, 9, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 0, 11, 0, 10, 0, 12, 0, 1, 0, 12, 0, 13, 0, 13, 0, 11, 0, 14, 0, 14, 0, 14, 0, 14, 0, 15, 0, 12, 0, 16, 0, 15, 0, 15, 0, 17, 0, 16, 0, 13, 0, 18, 0, 1, 0, 17, 0, 14, 0
Offset: 0

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Crossrefs

Cf. also A322983.

Programs

Formula

a(0) = 0; for n >= 1, for n odd, a(n) = 0, and for n even, a(n) = 1 + a(n-A000005(n)).
a(n) <= A155043(n).
For n >= 83, a(2*n) = 1+A322987(2*n).

A323073 Number of iterations of A049820(x) = x - A000005(x) needed to reach either zero or such x that x and A049820(x) are coprime, when starting from x = n.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 2, 0, 1, 3, 3, 0, 3, 0, 4, 0, 0, 0, 4, 0, 5, 0, 5, 0, 1, 0, 6, 0, 6, 0, 6, 0, 7, 0, 7, 0, 1, 0, 8, 0, 8, 0, 8, 0, 9, 1, 9, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 0, 11, 0, 10, 0, 12, 1, 0, 0, 12, 0, 13, 0, 13, 0, 11, 0, 14, 1, 14, 0, 14, 0, 14, 0, 15, 0, 12, 0, 16, 0, 15, 0, 15, 0, 17, 0, 16, 0, 13, 0
Offset: 0

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Crossrefs

Cf. A046642 (positions of zeros after the initial a(0)=0).

Programs

  • PARI
    A323073(n) = if(!n,0,my(nn=(n-numdiv(n))); if(1==gcd(n,nn),0,1+A323073(nn)));
    
  • PARI
    A323073(n) = if(!n,0,for(j=0,oo,my(nn=(n-numdiv(n))); if((0==nn)||(1==gcd(n,nn)),return(j+(2==n)),n = nn)));

Formula

a(0) = 0; for n > 0, if A009191(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(n-A000005(n)).
a(n) <= A155043(n).

A263270 Each n occurs A262507(n) times.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2015

Keywords

Crossrefs

Formula

Other identities. For all n >= 0:
a(n) = A155043(A263265(n)).
a(A263260(n)) = n+1. [The sequence is one more than the least monotonic left inverse of A263260.]

A261104 a(0)=0; for n >= 1, a(n) = 1 + a(n-A070319(n)), where A070319(n) is the maximum value for A000005 (number of divisors) in range 1 .. n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 5, 4, 5, 5, 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 8, 7, 8, 7, 8, 8, 8, 8, 8, 8, 9, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 9, 10, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 12, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 12, 13, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 14, 13, 14, 14, 14, 14, 14, 14, 14, 14
Offset: 0

Views

Author

Antti Karttunen, Sep 24 2015

Keywords

Comments

Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by k - A070319(k), where A070319(k) is the maximum value for A000005 (number of divisors) in range 1 .. k.

Crossrefs

Cf. A262502 (positions of records).

Formula

a(0)=0; for n >= 1, a(n) = 1 + a(n-A070319(n)).
Other identities. For all n >= 0:
a(A262502(n)) = n.

A262520 a(n) = A262519(n) - A262518(n).

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 1, 1, 3, 2, 3, 0, 3, 4, 5, 4, 5, 3, 5, 6, 7, 5, 6, 1, 6, 7, 7, 8, 8, 10, 7, 2, 10, 9, 10, 13, 9, 11, 12, 1, 1, 4, 1, 3, 3, 2, 3, 7, 2, 2, 5, 7, 4, 9, 5, 6, 5, 5, 5, 6, 5, 1, 3, 7, 2, 8, 1, 8, 3, 9, 3, 3, 2, 3, 5, 3, 4, 6, 4, 6, 7, 4, 6, 2, 6, 6, 1, 7, 7, 10, 8, 9, 8, 8, 9, 10, 8, 1, 10, 10, 10, 11, 9, 11, 12, 10, 12, 13, 12, 13, 13, -2, -1, 2, 13, 13, 14, 14, 15
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2015

Keywords

Comments

a(n) = How many steps more are needed to reach zero when starting from k = 2*n + 1 than when starting from k = 2*n and repeatedly applying the map that replaces k by k - d(k)? [Here d(k) is the number of divisors of k (A000005)]. If it takes more steps when starting from 2n than from 2n+1, then a(n) is negative.

Crossrefs

Cf. A000005, A049820, A155043, A262518, A262519, A262521 (positions of negative values).

Programs

Formula

a(n) = A262519(n) - A262518(n).
Previous Showing 31-40 of 54 results. Next