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

A386261 a(n) = A001511(A001511(n)), where A001511 is the ruler function.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jul 17 2025

Keywords

Comments

The first occurrence of k = 1, 2, ... is at n = 2^(2^(k-1) - 1) = A058891(k).
The asymptotic density of the occurrences of k = 1, 2, ... in this sequence is 2^(2^(k-1))/(2^(2^k)-1) = 2/3, 4/15, 16/255, 256/65535, 65536/4294967295, ...

Crossrefs

Programs

  • Mathematica
    f[n_] := IntegerExponent[n, 2] + 1; a[n_] := f[f[n]]; Array[a, 100]
  • PARI
    a(n) = valuation(valuation(n, 2) + 1, 2) + 1;

Formula

a(n) >= 1, with equality if and only if n is in A003159.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{m>=0} 1/(2^(2^m) - 1) = 1.4039368... (A048649).

A386262 a(n) = A051903(A051903(n)) for n >= 2, a(1) = 0.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Jul 17 2025

Keywords

Comments

The first occurrence of k = 1, 2, ... is at n = 2^(2^k) = A001146(k).
If n is an exponentially squarefree number (A209061) then a(n) <= 1. The converse is not necessarily true, with n = 2592 = 2^5 * 3^4 being the least counterexample.
The asymptotic density of the occurrences of 0 in this sequence is 1/zeta(2) = 6/Pi^2 (A059956).
The asymptotic density of the occurrences of 1 in this sequence is Sum_{k squarefree > 1} (1/zeta(k+1) - 1/zeta(k)) = 0.348423339572619656701... .

Crossrefs

Programs

  • Mathematica
    f[n_] := Max[FactorInteger[n][[;; , 2]]]; f[1] = 0; a[n_] := f[f[n]]; a[1] = 0; Array[a, 100]
  • PARI
    f(n) = if(n == 1, 0, vecmax(factor(n)[,2]));
    a(n) = if(n == 1, 0, f(f(n)));

Formula

a(n) = 0 if and only if n is squarefree (A005117).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=2} A051903(k) * (1/zeta(k+1)-1/zeta(k)) = 0.43779421197744649258... .

A366779 a(n) = lambda(lambda(lambda(n))), where lambda(n) is the Carmichael lambda function (A002322).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 4, 10, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 6, 1, 2, 2, 1, 2, 1, 2, 4, 2, 4, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 6, 2, 4, 1, 2, 2, 2
Offset: 1

Views

Author

Miles Englezou, Dec 15 2023

Keywords

Examples

			a(5) = 1, since A181776(5) = 2, and A002322(2) = 1.
		

Crossrefs

Cf. A002322 (lambda function), A181776 (lambda function at two iterations).

Programs

  • Maple
    a:= n-> (numtheory[lambda]@@3)(n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 19 2024
  • Mathematica
    a[n_]:=Nest[CarmichaelLambda,n,3]; Array[a,87] (* Stefano Spezia, Jan 20 2024 *)
  • PARI
    a(n) = lcm(znstar(lcm(znstar(lcm(znstar(11)[2]))[2]))[2])
    
  • Python
    from sympy import reduced_totient
    def A366779(n): return reduced_totient(reduced_totient(reduced_totient(n))) # Chai Wah Wu, Jan 29 2024

Formula

a(n) = A002322(A181776(n)).
Showing 1-3 of 3 results.