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

A009194 a(n) = gcd(n, sigma(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 4, 1, 2, 3, 1, 1, 3, 1, 2, 1, 2, 1, 12, 1, 2, 1, 28, 1, 6, 1, 1, 3, 2, 1, 1, 1, 2, 1, 10, 1, 6, 1, 4, 3, 2, 1, 4, 1, 1, 3, 2, 1, 6, 1, 8, 1, 2, 1, 12, 1, 2, 1, 1, 1, 6, 1, 2, 3, 2, 1, 3, 1, 2, 1, 4, 1, 6, 1, 2, 1, 2, 1, 28, 1, 2, 3, 4, 1, 18, 7, 4, 1, 2, 5, 12, 1, 1, 3, 1, 1, 6, 1, 2
Offset: 1

Views

Author

Keywords

Comments

LCM of common divisors of n and sigma(n). It equals n if n is multiply perfect (A007691). - Labos Elemer, Aug 14 2002

Crossrefs

Programs

Formula

A000005(a(n)) = A073802(n). - Reinhard Zumkeller, Mar 12 2010
A006530(a(n)) = A082062(n). - Reinhard Zumkeller, Jul 10 2011
a(A014567(n)) = 1; A069059(a(n)) > 1. - Reinhard Zumkeller, Mar 23 2013
a(n) = n/A017666(n). - Antti Karttunen, May 22 2017

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

A286570 Compound filter (prime signature of n & gcd(n, sigma(n))): a(n) = P(A046523(n), A009194(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 3, 3, 10, 3, 61, 3, 36, 10, 27, 3, 117, 3, 27, 34, 136, 3, 103, 3, 90, 21, 27, 3, 619, 10, 27, 36, 753, 3, 625, 3, 528, 34, 27, 21, 666, 3, 27, 21, 552, 3, 625, 3, 117, 103, 27, 3, 1323, 10, 78, 34, 90, 3, 430, 21, 489, 21, 27, 3, 2545, 3, 27, 78, 2080, 21, 625, 3, 90, 34, 495, 3, 2773, 3, 27, 78, 117, 21, 625, 3, 1224, 136, 27, 3, 3801, 21, 27, 34, 375, 3
Offset: 1

Views

Author

Antti Karttunen, May 26 2017

Keywords

Crossrefs

Programs

  • PARI
    A009194(n) = gcd(n, sigma(n));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286570(n) = (1/2)*(2 + ((A046523(n)+A009194(n))^2) - A046523(n) - 3*A009194(n));
    
  • Python
    from sympy import factorint, gcd, divisor_sigma
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(a046523(n), gcd(n, divisor_sigma(n))) # Indranil Ghosh, May 26 2017
  • Scheme
    (define (A286570 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A009194 n)) 2) (- (A046523 n)) (- (* 3 (A009194 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A046523(n)+A009194(n))^2) - A046523(n) - 3*A009194(n)).
Showing 1-3 of 3 results.