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 51-54 of 54 results.

A320357 a(0)=1; a(1)=1; for n >= 2, a(n) = a(n-1) + a(n-A000005(n)).

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 9, 16, 20, 29, 38, 67, 76, 143, 181, 248, 315, 563, 639, 1202, 1383, 1946, 2585, 4531, 4846, 7431, 10016, 14547, 17132, 31679, 34264, 65943, 75959, 107638, 141902, 207845, 222392, 430237, 572139, 779984, 855943, 1635927, 1777829, 3413756, 3985895, 4765879
Offset: 0

Views

Author

Ctibor O. Zizka, Oct 11 2018

Keywords

Examples

			a(4) = a(3)+a(1) = a(2)+a(1)+a(1) = a(1)+a(0)+a(1)+a(1) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n < 2, 1, a[n-1] + a[n - DivisorSigma[0, n]]]; Table[a[n], {n, 0, 50}] (* Vaclav Kotesovec, Oct 14 2018 *)

Formula

1 <= a(n+1)/a(n) <= 2. - Vaclav Kotesovec, Oct 14 2018
By empirical observation a(n) ~ 3.179662855437*exp(0.3175*n). - Ctibor O. Zizka, Oct 15 2018

A330738 Ordinal transform of A049820, where A049820(n) = n - d(n), with d(n) the number of divisors of n (A000005).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 11 2020

Keywords

Crossrefs

Programs

  • Mathematica
    b[_] = 0;
    a[n_] := a[n] = With[{t = n - DivisorSigma[0, n]}, b[t] = b[t]+1];
    Array[a, 105] (* Jean-François Alcover, Dec 22 2021 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A049820(n) = (n-numdiv(n));
    v330738 = ordinal_transform(vector(up_to, n, A049820(n)));
    A330738(n) = v330738[n];

A327715 a(0) = 0; for n >= 1, a(n) = 1 + a(n-A009191(n)).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Sep 23 2019

Keywords

Comments

Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k with k - gcd(k,d(k)), where d(k) is the number of divisors of k (A000005).
Empirically: n/log(n) <= a(n) <= n/log(n) + 2*log(n).

Examples

			a(6) = 1 + a(6-gcd(6,4)) = 1 + a(4) = 2 + a(4-gcd(4,3)) = 2 + a(3) = 3 + a(3-gcd(3,2)) = 3 + a(2) = 4 + a(2-gcd(2,2)) = 4 + a(0) = 4.
		

Crossrefs

Programs

  • PARI
    a(n) = if (n==0, 0, 1 + a(n - gcd(n, numdiv(n)))); \\ Michel Marcus, Sep 25 2019

A330877 Number of steps needed to reach zero or a cycle when starting from k = n and repeatedly applying the map that replaces k by k - d(k) if k is even, by k + d(k) if k is odd, where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

0, 2, 1, 7, 3, 6, 2, 5, 4, 4, 3, 12, 3, 11, 4, 10, 13, 10, 4, 9, 5, 8, 5, 8, 14, 7, 6, 32, 6, 32, 6, 31, 7, 30, 7, 29, 33, 29, 8, 28, 8, 28, 8, 27, 9, 26, 9, 12, 9, 11, 10, 25, 10, 25, 10, 24, 10, 23, 11, 23, 10, 22, 12, 21, 24, 21, 12, 21, 13
Offset: 0

Views

Author

Ctibor O. Zizka, Apr 29 2020

Keywords

Comments

First cycle we see for n = 83. The length of the cycle is 38 steps. To reach a cycle means the time to first step into the loop.

Examples

			n = 1, mapping steps are 1 + 1 = 2, 2 - 2 = 0, a(1) = 2;
n = 2, mapping steps are 2 - 2 = 0, a(2) = 1;
n = 3, mapping steps are 3 + 2 = 5, 5 + 2 = 7, 7 + 2 = 9, 9 + 3 = 12, 12 - 6 = 6, 6 - 4 = 2, 2 - 2 = 0, a(3) = 7;
n = 4, mapping steps are 4 - 3 = 1, 1 + 1 = 2, 2 - 2 = 0, a(4) = 3;
n = 5, mapping steps are 5 + 2 = 7, 7 + 2 = 9, 9 + 3 = 12, 12 - 6 = 6, 6 - 4 = 2, 2 - 2 = 0, a(5) = 6.
		

Crossrefs

Previous Showing 51-54 of 54 results.