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.

A330752 Number of values of k, 1 <= k <= n, with A328478(k) = A328478(n), where A328478(n) gives the remainder when all maximal primorial divisors of n (from the largest to smallest) have been divided out.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 30 2019

Keywords

Comments

Ordinal transform of A328478.

Crossrefs

Programs

  • Mathematica
    A111701[n_] := A111701[n] = Block[{m = n, k = 1}, While[IntegerQ[m/Prime[k]], m = m/Prime[k]; k++]; m];
    A328478[n_] := A328478[n] = If[A111701[n] == n, n, A328478[A111701[n]]];
    Module[{b}, b[_] = 0;
    a[n_] := With[{t = A328478[n]}, b[t] = b[t] + 1]];
    Array[a, 105] (* Jean-François Alcover, Jan 11 2022, after Robert G. Wilson v in A111701 *)
  • 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; };
    A111701(n) = forprime(p=2, , if(n%p, return(n), n /= p));
    A328478(n) = { my(u=A111701(n)); if(u==n, return(n), return(A328478(u))); };
    v330752 = ordinal_transform(vector(up_to, n, A328478(n)));
    A330752(n) = v330752[n];