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

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");

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");

A326198 Number of positive integers that are reachable from n with some combination of transitions x -> x-phi(x) and x -> gcd(x,phi(x)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 24 2019

Keywords

Examples

			From n = 12 we can reach any of the following numbers > 0: 12 (with an empty sequence of transitions), 8 (as A051953(12) = 8), 4 (as A009195(12) = A009195(8) = A051953(8) = 4), 2 (as A009195(4) = A051953(4) = 2) and 1 (as A009195(2) = A051953(2) = 1), thus a(12) = 5.
The directed acyclic graph formed from those two transitions with 12 as its unique root looks like this:
    12
    / \
   |   8
    \ /
     4
     |
     2
     |
     1
		

Crossrefs

Programs

  • PARI
    A326198aux(n,xs) = if(vecsearch(xs,n),xs, xs = setunion([n],xs); if(1==n,xs, my(a=gcd(n,eulerphi(n)), b=n-eulerphi(n)); xs = A326198aux(a,xs); if((a==b),xs, A326198aux(b,xs))));
    A326198(n) = length(A326198aux(n,Set([])));

Formula

a(n) > max(A071575(n), A326195(n)).
Showing 1-4 of 4 results.