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-10 of 60 results. Next

A050399 Least k such that n = A009195(k) (= gcd(phi(k), k)).

Original entry on oeis.org

1, 4, 9, 8, 25, 18, 49, 16, 27, 50, 121, 36, 169, 98, 225, 32, 289, 54, 361, 100, 147, 242, 529, 72, 125, 338, 81, 196, 841, 450, 961, 64, 1089, 578, 1225, 108, 1369, 722, 507, 200, 1681, 294, 1849, 484, 675, 1058, 2209, 144, 343, 250, 2601, 676, 2809
Offset: 1

Views

Author

Christian G. Bower, Nov 15 1999

Keywords

Comments

Coincides with A072995 for many terms, but differs, e.g., in n = 20, 40, 52, ... in addition to the zeros in A072995. See also the comments in A072994. - M. F. Hasler, Feb 23 2014
a(n) <= n^2. - Robert G. Wilson v, Feb 27 2014

Programs

  • Mathematica
    t = Table[0, {10000}]; k = 1; While[k < 100000001, a = GCD[k, EulerPhi@ k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++]; t (* Robert G. Wilson v, Feb 27 2014 *)
  • PARI
    A050399=n->for(k=1,oo,gcd(eulerphi(k),k)==n&&return(k)) \\ M. F. Hasler, Feb 23 2014

A300240 Filter sequence combining A009195(n) and A046523(n), i.e., gcd(n,phi(n)) and the prime signature of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 02 2018

Keywords

Comments

Restricted growth sequence transform of P(A009195(n), A046523(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(6) = a(10) (= 4) because both 6 and 10 are nonsquare semiprimes, and A009195(6) = A009195(10) = 2.
		

Crossrefs

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A009195(n) = gcd(n, eulerphi(n));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    Aux300240(n) = (1/2)*(2 + ((A046523(n)+A009195(n))^2) - A046523(n) - 3*A009195(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300240(n))),"b300240.txt");

A300242 Filter sequence combining gcd(n,sigma(n)) and gcd(n,phi(n)), (A009194 and A009195).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 02 2018

Keywords

Comments

Restricted growth sequence transform of P(A009194(n), A009195(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(15) = a(33) (= 8) because A009194(15) = A009194(33) = 3 and A009195(15) = A009195(33) = 1.
a(20) = a(52) (= 11) because A009194(20) = A009194(52) = 2 and A009195(20) = A009195(52) = 4.
		

Crossrefs

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A009194(n) = gcd(n, sigma(n));
    A009195(n) = gcd(n, eulerphi(n));
    Aux300242(n) = (1/2)*(2 + ((A009194(n)+A009195(n))^2) - A009194(n) - 3*A009195(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300242(n))),"b300242.txt");

A300243 Filter sequence combining A051953(n) and A009195(n), n-phi(n) (cototient of n) and gcd(n,n-phi(n)).

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, 40, 41, 32, 42, 2, 43, 2, 44, 45, 46, 47, 48, 2, 49, 50, 48, 2, 51, 2, 52, 53, 54, 47, 55, 2, 56, 57, 58, 2, 59, 60, 61, 62, 63, 2, 64, 37, 65, 66, 67, 68, 69, 2, 70, 71
Offset: 1

Views

Author

Antti Karttunen, Mar 02 2018

Keywords

Comments

Restricted growth sequence transform of P(A051953(n), A009195(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(66) = a(70) (= 48) because A051953(66) = A051953(70) = 46 and A009195(66) = A009195(70) = 2.
		

Crossrefs

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A009195(n) = gcd(n, eulerphi(n));
    A051953(n) = (n - eulerphi(n));
    Aux300243(n) = (1/2)*(2 + ((A051953(n)+A009195(n))^2) - A051953(n) - 3*A009195(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300243(n))),"b300243.txt");

A326195 Number of iterations of x -> A009195(x) needed to reach 1 when starting from x = n, where A009195(x) = gcd(x, phi(x)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 24 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[NestWhileList[GCD[#,EulerPhi[#]]&,n,#>1&]]-1,{n,110}] (* Harvey P. Dale, Dec 21 2022 *)
  • PARI
    A326195(n) = if(1==n,0,1+A326195(gcd(n,eulerphi(n))));

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A009195(n)).
a(n) < A326196(n).

A300241 Filter sequence combining A001065(n) and A009195(n), the sum of proper divisors of n and gcd(n,phi(n)).

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, 40, 41, 42, 43, 2, 44, 2, 45, 46, 47, 48, 49, 2, 50, 51, 52, 2, 53, 2, 54, 55, 56, 48, 57, 2, 58, 59, 60, 2, 61, 62, 63, 64, 65, 2, 66, 37, 67, 68, 69, 70, 71, 2, 72, 73
Offset: 1

Views

Author

Antti Karttunen, Mar 02 2018

Keywords

Comments

Restricted growth sequence transform of P(A001065(n), A009195(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(65) = a(77) (= 48) because A001065(65) = A001065(77) = 19 and A009195(65) = A009195(77) = 1.
		

Crossrefs

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A001065(n) = (sigma(n)-n);
    A009195(n) = gcd(n, eulerphi(n));
    Aux300241(n) = (1/2)*(2 + ((A001065(n)+A009195(n))^2) - A001065(n) - 3*A009195(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300241(n))),"b300241.txt");

A326192 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => A009195(i) = A009195(j) and f(i) = f(j), where f(n) = gcd(n,sigma(n)) * (-1)^[gcd(n,sigma(n))==n] and A009195(n) = gcd(n, phi(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 24 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A009195(n), A326193(n)].
For all i, j:
A305800(i) = A305800(j) => a(i) = a(j),
a(i) = a(j) => A300242(i) = A300242(j),
a(i) = a(j) => A326196(i) = A326196(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; };
    Aux326192(n) = { my(u=gcd(n,sigma(n))); [gcd(n,eulerphi(n)), u*((-1)^(u==n))]; };
    v326192 = rgs_transform(vector(up_to, n, Aux326192(n)));
    A326192(n) = v326192[n];

A372569 Lexicographically earliest infinite sequence such that a(i) = a(j) => A009194(i) = A009194(j), A009195(i) = A009195(j) and A009223(i) = A009223(j), for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 25 2024

Keywords

Comments

Restricted growth sequence transform of the triple [A009194(n), A009195(n), A009223(n)].
For all i, j: A372570(i) = A372570(j) => a(i) = a(j) => A074389(i) = A074389(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; };
    Aux372569(n) = [gcd(n, sigma(n)), gcd(n, eulerphi(n)), gcd(eulerphi(n), sigma(n))];
    v372569 = rgs_transform(vector(up_to, n, Aux372569(n)));
    A372569(n) = v372569[n];

A372570 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A009194(n), A009195(n), A009223(n), A322361(n), A342671(n)], 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, 8, 3, 16, 17, 10, 18, 19, 3, 20, 3, 21, 22, 8, 23, 24, 3, 10, 25, 26, 3, 27, 3, 28, 29, 8, 3, 30, 31, 32, 33, 34, 3, 35, 36, 37, 38, 8, 3, 39, 3, 10, 40, 41, 42, 43, 3, 44, 22, 45, 3, 46, 3, 10, 47, 48, 49, 50, 3, 51, 52, 8, 3, 53, 54, 10, 55, 56, 3, 57, 58, 28, 15, 8, 59, 60, 3, 61, 62, 63, 3
Offset: 1

Views

Author

Antti Karttunen, May 25 2024

Keywords

Comments

Restricted growth sequence transform of the quintuple [A009194(n), A009195(n), A009223(n), A322361(n), A342671(n)].
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A372569(i) = A372569(j),
a(i) = a(j) => A372572(i) = A372572(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; };
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    Aux372570(n) = [gcd(n, sigma(n)), gcd(n, eulerphi(n)), gcd(eulerphi(n), sigma(n)), gcd(n, A003961(n)), gcd(sigma(n), A003961(n))];
    v372570 = rgs_transform(vector(up_to, n, Aux372570(n)));
    A372570(n) = v372570[n];

A002618 a(n) = n*phi(n).

Original entry on oeis.org

1, 2, 6, 8, 20, 12, 42, 32, 54, 40, 110, 48, 156, 84, 120, 128, 272, 108, 342, 160, 252, 220, 506, 192, 500, 312, 486, 336, 812, 240, 930, 512, 660, 544, 840, 432, 1332, 684, 936, 640, 1640, 504, 1806, 880, 1080, 1012, 2162, 768, 2058, 1000
Offset: 1

Views

Author

Keywords

Comments

Also Euler phi function of n^2.
For n >= 3, a(n) is also the size of the automorphism group of the dihedral group of order 2n. This automorphism group is isomorphic to the group of transformations x -> ax + b, where a, b and x are integers modulo n and a is coprime to n. Its order is n*phi(n). - Ola Veshta (olaveshta(AT)my-deja.com), Mar 18 2001
Order of metacyclic group of polynomial of degree n. - Artur Jasinski, Jan 22 2008
It appears that this sequence gives the number of permutations of 1, 2, 3, ..., n that are arithmetic progressions modulo n. - John W. Layman, Aug 27 2008
The conjecture by Layman is correct. Obviously any such permutation must have an increment that is prime to n, and almost as obvious that any such increment will work, with any starting value; hence phi(n) * n total. - Franklin T. Adams-Watters, Jun 09 2009
Consider the numbers from 1 to n^2 written line by line as an n X n square: a(n) = number of numbers that are coprime to all their horizontal and vertical immediate neighbors. - Reinhard Zumkeller, Apr 12 2011
n -> a(n) is injective: a(m) = a(n) implies m = n. - Franz Vrabec, Dec 12 2012 (See Mathematics Stack Exchange link for a proof.)
a(p) = p*(p-1) a pronic number, see A036689 and A002378. - Fred Daniel Kline, Mar 30 2015
Conjecture: All the rational numbers Sum_{i=j..k} 1/a(i) with 0 < min{2,k} <= j <= k have pairwise distinct fractional parts. - Zhi-Wei Sun, Sep 24 2015
From Jianing Song, Aug 25 2023: (Start)
a(n) is the order of the holomorph (see the Wikipedia link) of the cyclic group of order n. Note that Hol(C_n) and Aut(D_{2n}) are isomorphic unless n = 2, where D_{2n} is the dihedral group of order 2*n. See the Wordpress link.
The odd-indexed terms form a subsequence of A341298: the holomorph of an abelian group of odd order is a complete group. See Theorem 3.2, Page 618 of the W. Peremans link. (End)

Examples

			a(4) = 8 since phi(4) = 2 and 4 * 2 = 8.
a(5) = 20 since phi(5) = 4 and 5 * 4 = 20.
		

References

  • Peter Giblin, Primes and Programming: An Introduction to Number Theory with Computing. Cambridge: Cambridge University Press (1993) p. 116, Exercise 1.10.
  • J. L. Lagrange, Oeuvres, Vol. III Paris 1869.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of A047916.
Cf. A002619, A011755 (partial sums), A047918, A000010, A053650, A053191, A053192, A036689, A058161, A009262, A082473 (same terms, sorted into ascending order), A256545, A327172 (a left inverse), A327173, A065484.
Subsequence of A323333.

Programs

Formula

Multiplicative with a(p^e) = (p-1)*p^(2e-1). - David W. Wilson, Aug 01 2001
Dirichlet g.f.: zeta(s-2)/zeta(s-1). - R. J. Mathar, Feb 09 2011
a(n) = A173557(n) * A102631(n). - R. J. Mathar, Mar 30 2011
From Wolfdieter Lang, May 12 2011: (Start)
a(n)/2 = A023896(n), n >= 2.
a(n)/2 = (1/n) * Sum_{k=1..n-1, gcd(k,n)=1} k, n >= 2 (see A023896 and A076512/A109395). (End)
a(n) = lcm(phi(n^2),n). - Enrique Pérez Herrero, May 11 2012
a(n) = phi(n^2). - Wesley Ivan Hurt, Jun 16 2013
a(n) = A009195(n) * A009262(n). - Michel Marcus, Oct 24 2013
G.f.: -x + 2*Sum_{k>=1} mu(k)*k*x^k/(1 - x^k)^3. - Ilya Gutkovskiy, Jan 03 2017
a(n) = A082473(A327173(n)), A327172(a(n)) = n. -- Antti Karttunen, Sep 29 2019
Sum_{n>=1} 1/a(n) = 2.203856... (A065484). - Amiram Eldar, Sep 30 2019
Define f(x) = #{n <= x: a(n) <= x}. Gabdullin & Iudelevich show that f(x) ~ c*sqrt(x) for c = Product_{p prime} (1 + 1/(p*(p - 1 + sqrt(p^2 - p)))) = 1.3651304521525857... - Charles R Greathouse IV, Mar 16 2022
a(n) = Sum_{d divides n} A001157(d)*A046692(n/d); that is, the Dirichlet convolution of sigma_2(n) and the Dirichlet inverse of sigma_1(n). - Peter Bala, Jan 26 2024

Extensions

Better description from Labos Elemer, Feb 18 2000
Showing 1-10 of 60 results. Next