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 41-50 of 308 results. Next

A319348 Lexicographically earliest infinite sequence such that a(i) = a(j) => A003557(i) = A003557(j) and A051953(i) = A051953(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 15, 2, 16, 17, 18, 19, 20, 2, 21, 2, 22, 23, 24, 25, 26, 2, 27, 28, 29, 2, 30, 2, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 28, 40, 41, 30, 2, 42, 2, 43, 44, 45, 46, 47, 2, 48, 49, 47, 2, 50, 2, 51, 52, 53, 46, 54, 2, 55, 56, 57, 2, 58, 41, 59, 60, 61, 2, 62, 37, 63, 64, 65, 66, 67, 2, 68, 69, 70, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 29 2018

Keywords

Comments

Restricted growth sequence transform of ordered pair [A003557(n), A051953(n)].
For all i, j: a(i) = a(j) => A318305(i) = A318305(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };
    A051953(n) = (n-eulerphi(n));
    v319348 = rgs_transform(vector(up_to,n,[A003557(n),A051953(n)]));
    A319348(n) = v319348[n];

Formula

For n >= 3, a(n) = A319349(n) - 1.

Extensions

Name changed by Antti Karttunen, Feb 03 2024

A344178 Difference between the arithmetic derivative of n and the cototient of n: a(n) = A003415(n) - A051953(n).

Original entry on oeis.org

0, 0, 0, 2, 0, 1, 0, 8, 3, 1, 0, 8, 0, 1, 1, 24, 0, 9, 0, 12, 1, 1, 0, 28, 5, 1, 18, 16, 0, 9, 0, 64, 1, 1, 1, 36, 0, 1, 1, 44, 0, 11, 0, 24, 18, 1, 0, 80, 7, 15, 1, 28, 0, 45, 1, 60, 1, 1, 0, 48, 0, 1, 24, 160, 1, 15, 0, 36, 1, 13, 0, 108, 0, 1, 20, 40, 1, 17, 0, 128, 81, 1, 0, 64, 1, 1, 1, 92, 0, 57, 1, 48, 1, 1, 1, 208
Offset: 1

Views

Author

Antti Karttunen, May 23 2021

Keywords

Comments

Question: Are all terms nonnegative? See also A211991 and A344584.
From Bernard Schott, May 25 2021: (Start)
Answer: Yes, can be proved when n = Product_{i=1..k} p_i^e_i with n' = n * Sum_{i=1..k} (e_i/p_i) and cototient(n) = n * (1 - Product_{i=1..k} (1 - 1/p_i)).
a(n) = 0 iff n is in A008578 (1 together with the primes).
a(n) = 1 iff n is in A006881 (squarefree semiprimes) (End).

Crossrefs

Cf. A000010, A003415, A051953, A168036, A344584 (inverse Möbius transform).
Cf. also A211991.

Programs

  • Mathematica
    Array[If[# < 2, 0, # Total[#2/#1 & @@@ FactorInteger[#]]] - # + EulerPhi[#] &, 96] (* Michael De Vlieger, May 24 2021 *)
  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A344178(n) = A003415(n) - (n-eulerphi(n));

Formula

a(n) = A003415(n) - A051953(n) = A168036(n) + A000010(n).

A361021 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(i) = A007814(j), A001065(i) = A001065(j) and A051953(i) = A051953(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 3, 6, 7, 8, 3, 9, 3, 10, 11, 12, 3, 13, 3, 14, 15, 16, 3, 17, 18, 19, 20, 21, 3, 22, 3, 23, 24, 25, 26, 27, 3, 28, 29, 30, 3, 31, 3, 32, 33, 34, 3, 35, 36, 37, 38, 39, 3, 40, 29, 41, 42, 43, 3, 44, 3, 45, 46, 47, 48, 49, 3, 50, 51, 52, 3, 53, 3, 54, 55, 56, 48, 57, 3, 58, 59, 60, 3, 61, 42, 62, 63, 64, 3, 65, 38, 66, 67, 68, 69, 70, 3, 71
Offset: 1

Views

Author

Antti Karttunen, Mar 03 2023

Keywords

Comments

Restricted growth sequence transform of the triplet [A007814(n), A001065(n), A051953(n)].
For all i, j >= 1:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A305895(i) = A305895(j),
a(i) = a(j) => A319346(i) = A319346(j).

Crossrefs

Cf. also A353560.
Differs from A353520 for the first time at n=254, where a(254) = 187, while A353520(254) = 125.

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A007814(n) = valuation(n,2);
    A001065(n) = (sigma(n)-n);
    A051953(n) = (n-eulerphi(n));
    Aux361021(n) = [A007814(n), A001065(n), A051953(n)];
    v361021 = rgs_transform(vector(up_to,n,Aux361021(n)));
    A361021(n) = v361021[n];

A051961 Smallest number w such that A051953(w) = w - phi(w) is the n-th prime.

Original entry on oeis.org

4, 9, 25, 15, 35, 33, 65, 51, 95, 161, 87, 217, 185, 123, 215, 329, 371, 177, 427, 335, 213, 511, 395, 581, 1501, 485, 303, 515, 321, 545, 255, 635, 917, 411, 1529, 447, 1057, 1099, 455, 1169, 1211, 537, 1991, 573, 965, 591, 435, 2743, 1115, 681, 665
Offset: 1

Views

Author

Labos Elemer, Jan 05 2000

Keywords

Examples

			The 31st term is 255 since 255 - phi(255) = 127, the 31st prime, and no number less than 255 has this property.
		

Crossrefs

Programs

  • Mathematica
    With[{c=Table[n-EulerPhi[n],{n,4000}]},Table[Position[c,p,1,1],{p,Prime[ Range[ 60]]}]]//Flatten (* Harvey P. Dale, Sep 14 2020 *)
  • PARI
    a(n) = {my(k = 1); while(k - eulerphi(k) != prime(n), k++); k;} \\ Michel Marcus, Feb 02 2015

Formula

A050530(a(n)) = prime(n) and a(n) is the least number with this property.
a(n) = A063507(A000040(n)). - Michel Marcus, Feb 02 2015

A053480 Sum of values when cototient function A051953 is iterated until fixed point is reached.

Original entry on oeis.org

1, 3, 4, 7, 6, 13, 8, 15, 13, 23, 12, 27, 14, 29, 23, 31, 18, 45, 20, 47, 34, 49, 24, 55, 31, 55, 40, 59, 30, 79, 32, 63, 47, 79, 47, 91, 38, 85, 62, 95, 42, 121, 44, 99, 79, 101, 48, 111, 57, 129, 71, 111, 54, 145, 78, 119, 91, 137, 60, 159, 62, 125, 103, 127, 83, 167
Offset: 1

Views

Author

Labos Elemer, Jan 14 2000

Keywords

Examples

			If n=130 and A051953 is iterated, we obtain {130,82,42,30,22,12,8,4,2,1,0}. The sum of these terms is 130 + 92 + 42 + 30 + 12 + 8 + 4 + 2 + 1 = 333, so a(130)=333.
		

Crossrefs

Cf. A051953.

Programs

  • Mathematica
    Array[Total@ Most@ NestWhileList[# - EulerPhi@ # &, #, # > 0 &] &, 66] (* Michael De Vlieger, Nov 20 2017 *)

Formula

a(n) = Sum[Nest[co, n, j], {j, 1, x[n]}]; co[n]=A051953[n], x[n] is the number of iterations

A063476 Sum_{d |C(n)} d^2, where C(n) is the Cototient function n - phi(n) (A051953).

Original entry on oeis.org

0, 1, 1, 5, 1, 21, 1, 21, 10, 50, 1, 85, 1, 85, 50, 85, 1, 210, 1, 210, 91, 210, 1, 341, 26, 250, 91, 341, 1, 610, 1, 341, 170, 455, 122, 850, 1, 546, 260, 850, 1, 1300, 1, 850, 500, 850, 1, 1365, 50, 1300, 362, 1050, 1, 1911, 260, 1365, 500, 1300, 1, 2562, 1, 1365
Offset: 1

Views

Author

Jason Earls, Jul 27 2001

Keywords

Crossrefs

Cf. A051953.

Programs

  • PARI
    C(n)=n-eulerphi(n); j=[]; for(n=1,200,j=concat(j,sumdiv(C(n),d,d^2))); j
    
  • PARI
    { for (n=1, 1000, if (n>1, a=sumdiv(n-eulerphi(n), d, d^2), a=0); write("b063476.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 22 2009

A063480 C(n+3)=2*C(n), where C(n) is Cototient(n) := n - phi(n) (A051953).

Original entry on oeis.org

39, 55, 111, 183, 219, 459, 471, 579, 831, 867, 939, 1191, 1263, 1371, 1623, 1839, 1983, 2019, 2199, 2271, 2631, 2991, 3279, 3459, 3603, 3639, 3711, 3963, 4143, 4359, 4863, 4947, 4971, 5259, 5619, 5799, 5979, 6051, 6411, 7023, 7107, 7419, 7671, 7779
Offset: 1

Views

Author

Jason Earls, Jul 28 2001

Keywords

Examples

			C(39) = 15, C(39+3) = 2*15.
		

Crossrefs

Cf. A059153.

Programs

  • PARI
    C(n)=n-eulerphi(n); j=[]; for(n=1,20000, if(C(n+3)==2*C(n),j=concat(j,n))); j
    
  • PARI
    { n=0; c1=c2=c3=1; for (m=1, 10^9, c=c1; c1=c2; c2=c3; c3=m-eulerphi(m); if (c3==2*c, write("b063480.txt", n++, " ", m - 3); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 23 2009

A082506 a(n) = gcd(2^n, n - phi(n)); largest power of 2 dividing cototient(n) = A051953(n).

Original entry on oeis.org

2, 1, 1, 2, 1, 4, 1, 4, 1, 2, 1, 8, 1, 8, 1, 8, 1, 4, 1, 4, 1, 4, 1, 16, 1, 2, 1, 16, 1, 2, 1, 16, 1, 2, 1, 8, 1, 4, 1, 8, 1, 2, 1, 8, 1, 8, 1, 32, 1, 2, 1, 4, 1, 4, 1, 32, 1, 2, 1, 4, 1, 32, 1, 32, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 8, 1, 2, 1, 16, 1, 2, 1, 4, 1, 4, 1, 16, 1, 2, 1, 16, 1, 16, 1, 64, 1, 8, 1
Offset: 1

Views

Author

Labos Elemer, Apr 28 2003

Keywords

Comments

a(n)=1 if and only if n is odd or n = 2. - Robert Israel, May 31 2018

Examples

			Different from A069177, analogous sequence with totient, instead of cototient.
		

Crossrefs

Programs

  • Maple
    f:= n -> padic:-ordp(n - numtheory:-phi(n), 2):
    map(f, [$1..100]); # Robert Israel, May 31 2018

A098115 a(n) is the length of iteration trajectory when the cototient function (A051953) is applied to the half of the n-th primorial number (A070826(n) = A002110(n)/2).

Original entry on oeis.org

2, 3, 4, 7, 10, 5, 12, 15, 12, 28, 6, 6, 31, 12, 47, 29, 23, 32, 33, 24, 40, 28, 12, 35, 34, 56, 17, 36, 40, 123, 57, 61, 9, 99, 94, 132, 158, 172, 23, 43, 89, 186, 196, 194, 203, 157, 205, 62, 32, 26, 76, 105, 65, 45, 177, 56, 278
Offset: 1

Views

Author

Labos Elemer, Sep 27 2004

Keywords

Comments

Initial values are here odd numbers. Comparing with the case of primorials (A098202), the lengths are here significantly smaller. The cause of this is unknown, albeit informally "understood": lack of powers of 2 in lists because parity is invariant during this iteration. See also lists for A098200 and A098201.

Examples

			For n = 7: list = {255255,163095,77815,16663,895,183,63,27,9,3,1,0}, a(7) = 12, while the comparable length for 510510 is A098202(7) = 43.
		

Crossrefs

Programs

  • Mathematica
    g[x_] :=x-EulerPhi[x]; f[x_] :=Length[FixedPointList[g, x]]-1; q[x_] :=Apply[Times, Table[Prime[j], {j, 1, x}]]; t=Table[f[q[w]/2], {w, 1, 37}]
    a[n_] := Length@ NestWhileList[(# - EulerPhi[#])&, Times @@ Prime[Range[2, n]], # > 0 &]; Array[a, 30] (* Amiram Eldar, Nov 19 2024 *)
  • PARI
    a(n) = {my(p = prod(i=2, n, prime(i)), c = 1); while(p > 0, c++; p -= eulerphi(p)); c;} \\ Amiram Eldar, Nov 19 2024

Formula

a(n) = A053475(A070826(n)) = A053475(A002110(n)/2).

Extensions

a(38)-a(57) from Amiram Eldar, Nov 19 2024

A141846 Triangle read by rows: A051731 * A051953^(n-k) * 0^(n-k), 1 <= k <= n.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 4, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8
Offset: 1

Views

Author

Gary W. Adamson, Jul 11 2008

Keywords

Comments

Row sums = A001065: (0, 1, 1, 3, 1, 6, 1, 7, 4, 8,...).
n-th row = (p-1) zeros followed by 1, iff n is prime.
For T(n,k), k divides n if k not = 0.

Examples

			First few rows of the triangle =
0;
0, 1;
0, 0, 1;
0, 1, 0, 2;
0, 0, 0, 0, 1;
0, 1, 1, 0, 0, 4;
0, 0, 0, 0, 0, 0, 1;
0, 1, 0, 2, 0, 0, 0, 4;
0, 0, 1, 0, 0, 0, 0, 0, 3;
0, 1, 0, 0, 1, 0, 0, 0, 0, 6;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
0, 1, 1, 2, 0, 4, 0, 0, 0, 0, 0, 8;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8;
...
		

Crossrefs

Formula

Triangle read by rows, A051731 * A051953^(n-k); where A051953^(n-k) = an infinite lower triangular matrix with A051953 (0, 1, 1, 2, 1, 4, 1, 4, 3, 6, 1, 8,...) in the main diagonal and the rest zeros. A051731 = inverse Mobius transform.
Previous Showing 41-50 of 308 results. Next