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

A303754 a(1) = 1 and for n > 1, a(n) = number of values of k, 2 <= k <= n, with A303753(k) = A303753(n), where A303753 is ordinal transform of cototient, A051953.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 2, 4, 5, 1, 6, 1, 3, 7, 2, 1, 8, 1, 4, 9, 3, 1, 10, 11, 12, 5, 6, 1, 13, 1, 4, 14, 15, 16, 17, 1, 18, 19, 7, 1, 20, 1, 5, 21, 2, 1, 22, 8, 9, 23, 24, 1, 25, 10, 11, 12, 6, 1, 26, 1, 7, 27, 3, 28, 29, 1, 13, 30, 14, 1, 31, 1, 32, 33, 34, 15, 35, 1, 16, 17, 36, 1, 37, 8, 18, 38, 9, 1, 39, 19, 4, 40, 2, 41, 42, 1, 43, 44, 20, 1, 45, 1, 21
Offset: 1

Views

Author

Antti Karttunen, Apr 30 2018

Keywords

Comments

Ordinal transform of f, where f(1) = 0 and f(n) = A303753(n) for n > 1.

Crossrefs

Cf. also A081373, A303757.

Programs

  • Mathematica
    b[_] = 0;
    A303753[n_] := A303753[n] = With[{t = EulerPhi[n] - n}, b[t] = b[t]+1];
    f[n_] := If[n == 1, 0, A303753[n]];
    Clear[b]; b[_] = 0;
    a[n_] := a[n] = With[{t = f[n]}, b[t] = b[t]+1];
    Array[a, 105] (* Jean-François Alcover, Dec 19 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; };
    A051953(n) = (n - eulerphi(n));
    v303753 = ordinal_transform(vector(up_to,n,A051953(n)));
    Aux303754(n) = if(1==n,0,v303753[n]);
    v303754 = ordinal_transform(vector(up_to,n,Aux303754(n)));
    A303754(n) = v303754[n];

A322025 Ordinal transform of A322023.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 01 2018

Keywords

Comments

Positions where 1, 2, 3, 4, 5, ... occur for the first time are 1, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, ... Note that this is not a subsequence of A000961; for example, 187 = 11*17 is a semiprime.

Crossrefs

Programs

  • PARI
    \\ Needs also code from A322023.
    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; };
    v322025 = ordinal_transform(v322023);
    A322025(n) = v322025[n];
Showing 1-2 of 2 results.