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

A319989 a(n) = A303757(A252463(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 3, 2, 1, 2, 1, 3, 3, 1, 1, 4, 2, 1, 2, 3, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 2, 3, 1, 2, 1, 2, 4, 1, 1, 4, 1, 1, 3, 3, 1, 2, 2, 4, 3, 1, 1, 5, 1, 1, 3, 2, 2, 2, 1, 3, 3, 1, 1, 5, 1, 1, 4, 3, 1, 2, 1, 4, 2, 1, 1, 6, 2, 1, 2, 3, 1, 3, 2, 2, 2, 1, 1, 5, 1, 2, 4, 4, 1, 1, 1, 4, 5
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{s = Table[Which[n == 1, 1, EvenQ@n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n], {n, 120}], t}, t = EulerPhi@ Range@ Max@ s; Map[Function[n, Count[t[[2 ;; n]], ?(# == t[[n]] &)]], s] /. 0 -> 1] (* _Michael De Vlieger, Nov 23 2018 *)
  • 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; };
    Aux303757(n) = if(1==n,0,eulerphi(n));
    v303757 = ordinal_transform(vector(up_to,n,Aux303757(n)));
    A303757(n) = v303757[n];
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A319989(n) = A303757(A252463(n));

Formula

a(n) = A303757(A252463(n)).

A317847 Numerators of sequence whose Dirichlet convolution with itself yields A303757, the ordinal transform of function a(1) = 0; a(n) = phi(n) for n > 1, where phi is Euler's totient function (A000010).

Original entry on oeis.org

1, 1, 1, 7, 1, 5, 1, 9, 7, 5, 1, 15, 1, 5, 1, 43, 1, 15, 1, 7, 3, 3, 1, 5, 3, 5, 9, 15, 1, 9, 1, 87, 3, 5, 1, 1, 1, 5, 3, 13, 1, 11, 1, 11, 15, 3, 1, 187, 7, 19, 1, 15, 1, 5, 3, 21, 3, 3, 1, -1, 1, 3, 11, 387, 1, 9, 1, 7, 1, 13, 1, 119, 1, 7, 19, 23, 3, 19, 1, 139, -21, 7, 1, 21, 1, 5, 1, 39, 1, 67, 3, 3, 5, 3, 5, 451, 1, 15, 19, 69, 1, 13, 1, -27, 7
Offset: 1

Views

Author

Antti Karttunen, Aug 14 2018

Keywords

Crossrefs

Cf. A000010, A303757, A046644 (denominators).

Programs

  • Mathematica
    A303757[n_] := If[n == 2, 1, Count[EulerPhi[Range[n]] - EulerPhi[n], 0]];
    f[n_] := f[n] = If[n == 1, 1, (1/2)(A303757[n] -
         Sum[If[1Jean-François Alcover, Dec 20 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; };
    DirSqrt(v)={my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v303757 = ordinal_transform(vector(up_to,n,if(1==n,0,eulerphi(n))));
    v317847 = DirSqrt(vector(up_to, n, v303757[n]));
    A317847(n) = numerator(v317847[n]);

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A303757(n) - Sum_{d|n, d>1, d 1.

A046644 From square root of Riemann zeta function: form Dirichlet series Sum b_n/n^s whose square is zeta function; sequence gives denominator of b_n.

Original entry on oeis.org

1, 2, 2, 8, 2, 4, 2, 16, 8, 4, 2, 16, 2, 4, 4, 128, 2, 16, 2, 16, 4, 4, 2, 32, 8, 4, 16, 16, 2, 8, 2, 256, 4, 4, 4, 64, 2, 4, 4, 32, 2, 8, 2, 16, 16, 4, 2, 256, 8, 16, 4, 16, 2, 32, 4, 32, 4, 4, 2, 32, 2, 4, 16, 1024, 4, 8, 2, 16, 4, 8, 2, 128, 2, 4, 16, 16, 4, 8
Offset: 1

Views

Author

Keywords

Comments

From Antti Karttunen, Aug 21 2018: (Start)
a(n) is the denominator of any rational-valued sequence f(n) which has been defined as f(n) = (1/2) * (b(n) - Sum_{d|n, d>1, d
Proof:
Proof is by induction. We assume as our induction hypothesis that the given multiplicative formula for A046644 (resp. additive formula for A046645) holds for all proper divisors d|n, dA046645(p) = 1. [Remark: for squares of primes, f(p^2) = (4*b(p^2) - 1)/8, thus a(p^2) = 8.]
First we note that A005187(x+y) <= A005187(x) + A005187(y), with equivalence attained only when A004198(x,y) = 0, that is, when x and y do not have any 1-bits in the shared positions. Let m = Sum_{e} A005187(e), with e ranging over the exponents in prime factorization of n.
For [case A] any n in A268388 it happens that only when d (and thus also n/d) are infinitary divisors of n will Sum_{e} A005187(e) [where e now ranges over the union of multisets of exponents in the prime factorizations of d and n/d] attain value m, which is the maximum possible for such sums computed for all divisor pairs d and n/d. For any n in A268388, A037445(n) = 2^k, k >= 2, thus A037445(n) - 2 = 2 mod 4 (excluding 1 and n from the count, thus -2). Thus, in the recursive formula above, the maximal denominator that occurs in the sum is 2^m which occurs k times, with k being an even number, but not a multiple of 4, thus the factor (1/2) in the front of the whole sum will ensure that the denominator of the whole expression is 2^m [which thus is equal to 2^A046645(n) = a(n)].
On the other hand [case B], for squares in A050376 (A082522, numbers of the form p^(2^k) with p prime and k>0), all the sums A005187(x)+A005187(y), where x+y = 2^k, 0 < x <= y < 2^k are less than A005187(2^k), thus it is the lonely "middle pair" f(p^(2^(k-1))) * f(p^(2^(k-1))) among all the pairs f(d)*f(n/d), 1 < d < n = p^(2^k) which yields the maximal denominator. Furthermore, as it occurs an odd number of times (only once), the common factor (1/2) for the whole sum will increase the exponent of 2 in denominator by one, which will be (2*A005187(2^(k-1))) + 1 = A005187(2^k) = A046645(p^(2^k)).
(End)
From Antti Karttunen, Aug 21 2018: (Start)
The following list gives a few such pairs num(n), b(n) for which b(n) is Dirichlet convolution of num(n)/a(n). Here ε stands for sequence A063524 (1, 0, 0, ...).
Numerators Dirichlet convolution of numerator(n)/a(n) yields
------- -----------
(End)
This sequence gives an upper bound for the denominators of any rational-valued sequence obtained as the "Dirichlet Square Root" of any integer-valued sequence. - Andrew Howroyd, Aug 23 2018

Crossrefs

See A046643 for more details. See also A046645, A317940.
Cf. A299150, A299152, A317832, A317926, A317932, A317934 (for denominator sequences of other similar constructions).

Programs

Formula

From Antti Karttunen, Jul 08 2017: (Start)
Multiplicative with a(p^n) = 2^A005187(n).
a(1) = 1; for n > 1, a(n) = A000079(A005187(A067029(n))) * a(A028234(n)).
a(n) = A000079(A046645(n)).
(End)
Sum_{j=1..n} A046643(j)/A046644(j) ~ n / sqrt(Pi*log(n)) * (1 + (1 - gamma/2)/(2*log(n))), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 04 2025

A081373 Number of values of k, 1 <= k <= n, with phi(k) = phi(n), where phi is Euler totient function, A000010.

Original entry on oeis.org

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

Author

Labos Elemer, Mar 24 2003

Keywords

Comments

Ordinal transform of Euler totient function phi, A000010. - Antti Karttunen, Aug 26 2024

Examples

			For n = 16: phi(k) = {1,1,2,2,4,2,6,4,6,4,10,4,12,6,8,8} for k = 1,...,n; 2 numbers exist with phi(k) = phi(n) = 8: {15,16}, so a(16) = 2.
If n = p is an odd prime number, then a(p) = 1 with phi(k) = p-1.
		

Crossrefs

Cf. A000010, A081375 (positions of records), A210719 (of 1's).
Cf. also A067004, A303756, A303757, A303777 (ordinal transform of this sequence).

Programs

  • Mathematica
    f[x_] := Count[Table[EulerPhi[j]-EulerPhi[x], {j, 1, x}], 0] Table[f[w], {w, 1, 100}]
  • PARI
    a(n)=my(t=eulerphi(n), s); sum(k=1, n, eulerphi(k)==t) \\ Charles R Greathouse IV, Feb 21 2013, corrected by Antti Karttunen, Aug 26 2024
    
  • PARI
    a(n) = #select(x -> x <= n, invphi(eulerphi(n))); \\ Amiram Eldar, Nov 08 2024, using Max Alekseyev's invphi.gp

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

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];

A303758 a(1) = 1 and for n > 1, a(n) = number of values of k, 2 <= k <= n, with A002322(k) = A002322(n), where A002322 is Carmichael lambda.

Original entry on oeis.org

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

Author

Antti Karttunen, Apr 30 2018

Keywords

Comments

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

Crossrefs

Cf. A002322.
Cf. also A303756, A303757.

Programs

  • Mathematica
    a[1] = 1; a[n_] := With[{c = CarmichaelLambda[n]}, Select[Range[2, n], c == CarmichaelLambda[#]&] // Length];
    Array[a, 1000] (* Jean-François Alcover, Sep 19 2020 *)
  • 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; };
    A002322(n) = lcm(znstar(n)[2]); \\ From A002322
    Aux303758(n) = if(1==n,0,A002322(n));
    v303758 = ordinal_transform(vector(up_to,n,Aux303758(n)));
    A303758(n) = v303758[n];

Formula

Except for a(2) = 1, a(n) = A303756(n).
Showing 1-6 of 6 results.