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

A049060 a(n) = (-1)^omega(n)*Sum_{d|n} d*(-1)^omega(d), where omega(n) = A001221(n) is number of distinct primes dividing n.

Original entry on oeis.org

1, 1, 2, 5, 4, 2, 6, 13, 11, 4, 10, 10, 12, 6, 8, 29, 16, 11, 18, 20, 12, 10, 22, 26, 29, 12, 38, 30, 28, 8, 30, 61, 20, 16, 24, 55, 36, 18, 24, 52, 40, 12, 42, 50, 44, 22, 46, 58, 55, 29, 32, 60, 52, 38, 40, 78, 36, 28, 58, 40, 60, 30, 66, 125, 48, 20, 66, 80, 44, 24, 70
Offset: 1

Views

Author

Keywords

Comments

Might be called (-1)sigma(n). If x = Product p_i^r_i, then (-1)sigma(x) = Product (-1 + Sum p_i^s_i, s_i = 1 to r_i) = Product ((p_i^(r_i+1)-1)/(p_i-1)-2), with (-1)sigma(1) = 1. - Yasutoshi Kohmoto, May 23 2005

Crossrefs

Programs

  • Maple
    A049060 := proc(n) local it, ans, i, j; it := ifactors(n): ans := 1: for i from 1 to nops(ifactors(n)[2]) do ans := ans*(-1+sum(ifactors(n)[2][i][1]^j, j=1..ifactors(n)[2][i][2])): od: RETURN(ans) end: [seq(A049060(i),i=1..n)];
  • Mathematica
    a[p_?PrimeQ] := p-1; a[1] = 1; a[n_] := Times @@ ((#[[1]]^(#[[2]] + 1) - 2*#[[1]] + 1)/(#[[1]] - 1) & ) /@ FactorInteger[n]; Table[a[n], {n, 1, 71}] (* Jean-François Alcover, May 21 2012 *)
  • PARI
    A049060(n)={ local(i,resul,rmax,p) ; if(n==1, return(1) ) ; i=factor(n) ; rmax=matsize(i)[1] ; resul=1 ; for(r=1,rmax, p=0 ; for(j=1,i[r,2], p += i[r,1]^j ; ) ; resul *= p-1 ; ) ; return(resul) ; } { for(n=1,40, print(n," ",A049060(n)) ) ; } \\ R. J. Mathar, Oct 12 2006
    
  • PARI
    apply( A049060(n)=vecprod([(f[1]^(f[2]+1)-1)\(f[1]-1)-2 | f<-factor(n)~]), [1..99]) \\ M. F. Hasler, Sep 21 2022
    
  • Python
    from math import prod
    from sympy import factorint
    def A049060(n): return prod((p**(e+1)-2*p+1)//(p-1) for p,e in factorint(n).items()) # Chai Wah Wu, Sep 13 2021

Formula

a(n) = Sum_{d|n} d*(-1)^A001221(d).
Multiplicative with a(p^e) = (p^(e+1)-2*p+1)/(p-1).
Simpler: a(p^e) = (p^(e+1)-1)/(p-1)-2. - M. F. Hasler, Sep 21 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/12) * Product_{p prime} (1 - 2/p^2 + 2/p^3) = 0.4478559359... . - Amiram Eldar, Oct 25 2022

Extensions

More terms from James Sellers, May 03 2000
Better description from Vladeta Jovovic, Apr 06 2002

A049057 First element r of (-1)sigma sociable triple (r,s,t): s=(-1)sigma(r), t=(-1)sigma(s), r=(-1)sigma(t), where if x=Product p(i)^r(i), then (-1)sigma(x)=Product(-1+(Sum p(i)^s(i), s(i)=1 to r(i))).

Original entry on oeis.org

20, 40, 52, 60, 104, 120, 156, 312, 480, 488, 780, 1248, 1464, 1560, 5856, 6240, 7320, 7680, 8168, 9744, 13260, 19968, 24504, 26520, 29280, 93696, 98016, 99840, 106080, 122520, 124440, 468480, 490080, 497760, 1568256, 1697280, 2082840, 7841280
Offset: 0

Views

Author

Keywords

Comments

Since the definition is circular and the definition does not specify that r is the largest number in the triple, for each r in the sequence also the s and t show up. - R. J. Mathar, Oct 12 2006
Otherwise, if the definition is supposed to mean "smallest r of a triple....", the list is 20, 40, 104, 312, 480, 1248, 5856, 7680, 9744, 19968, 29280, ... - R. J. Mathar, Oct 12 2006
If, as a third interpretation, the sequence is "Smallest r of a triple of pairwise different numbers r,s,t with..." then the sequence is 40, 104, 480, 1248, 5856, 7680, ... - R. J. Mathar, Oct 12 2006

Examples

			Factorizations 2^3*5, 2^3*13, 2^3*61, 2^3*3*5*13, 2^3*1021, 2^3*3*5*13*17, 2^5*3*5*17*61.
(r,s,t)=(20,20,20), (40,52,60), (52,60,40), (60,40,52), (104,156,120), (120,104,156), ..., (29280,29280,29280).
		

Crossrefs

Programs

  • PARI
    A049060(n)={ local(i,resul,rmax,p) ; if(n==1, return(1) ) ; i=factor(n) ; rmax=matsize(i)[1] ; resul=1 ; for(r=1,rmax, p=0 ; for(j=1,i[r,2], p += i[r,1]^j ; ) ; resul *= p-1 ; ) ; return(resul) ; } isA049057(r)={ local(s,t) ; s=A049060(r) ; t=A049060(s) ; if( r == A049060(t), return(1), return(0) ) ; } { for(n=1,30000000, if( isA049057(n), print(n," ",factor(n)) ) ; ) ; } \\ R. J. Mathar, Oct 12 2006

Extensions

Corrected and extended by R. J. Mathar, Oct 12 2006

A049058 Second element s of (-1)sigma sociable triple (r,s,t): s=(-1)sigma(r), t=(-1)sigma(s), r=(-1)sigma(t), where if x=Product p(i)^r(i), then (-1)sigma(x)=Product(-1+(Sum p(i)^s(i), s(i)=1 to r(i))).

Original entry on oeis.org

60, 120, 480, 1464, 7680, 24504, 490080
Offset: 0

Views

Author

Keywords

Comments

Definition unclear, see comments in A049057. - Sean A. Irvine, Jul 17 2021

Examples

			Factorizations 2^2*3*5, 2^3*3*5, 2^5*3*5, 2^3*3*61, 2^9*3*5, 2^3*3*1021, 2^5*3*5*1021
		

Crossrefs

A051152 (-1)sigma sociable number of order 2: (-1)sigma((-1)sigma(x))=x, but (-1)sigma(x)<>x, where if x=Product p(i)^r(i) then (-1)sigma(x)=Product (-1+Sum p(i)^s(i), s(i)=1 to r(i)); (-1)sigma(1)=1.

Original entry on oeis.org

4, 5, 216, 494, 16800, 21228, 246400, 440220
Offset: 0

Views

Author

Keywords

Comments

Factorizations: 4, 5, 2^3*3^3, 2*13*19, 2^5*3*5^2*7, 2^2*3*29*61

Crossrefs

Programs

  • PARI
    A049060(n)={ local(i,resul,rmax,p) ; if(n==1, return(1) ) ; i=factor(n) ; rmax=matsize(i)[1] ; resul=1 ; for(r=1,rmax, p=0 ; for(j=1,i[r,2], p += i[r,1]^j ; ) ; resul *= p-1 ; ) ; return(resul) ; }
    isA051152(r)={ local(s,t) ; s=A049060(r) ; t=A049060(s) ; if( r == t && s !=r, return(1), return(0) ) ; }
    { for(n=1,30000000, if( isA051152(n), print(n," ") ) ; ) ; } \\ R. J. Mathar, Oct 12 2006

Extensions

More terms from R. J. Mathar, Oct 12 2006

A051153 (-1)-sigma super perfect numbers: (-1)sigma((-1)sigma(x))=2*x, where if x=Product p(i)^r(i) then (-1)sigma(x)=Product (-1+Sum p(i)^s(i), s(i)=1 to r(i)); (-1)sigma(1)=1.

Original entry on oeis.org

247, 988, 2808, 10440, 87696, 151200, 191052, 263520, 2630320, 3961980
Offset: 1

Views

Author

Keywords

Comments

Factorizations: 13*19, 2^3*3^2*5*29, 2^4*3^3*7*29, 2^5*3^3*5^2*7, 2^2*3^3*29*61, 2^5*3^3*5*61, 2^7*3*5*11*19*29*1021

Crossrefs

Programs

  • PARI
    A049060(n)={ local(i,resul,rmax,p) ; if(n==1, return(1) ) ; i=factor(n) ; rmax=matsize(i)[1] ; resul=1 ; for(r=1,rmax, p=0 ; for(j=1,i[r,2], p += i[r,1]^j ; ) ; resul *= p-1 ; ) ; return(resul) ; } isA051153(r)={ local(s,t) ; s=A049060(r) ; t=A049060(s) ; if( 2*r == t, return(1), return(0) ) ; } { for(n=1,30000000, if( isA051153(n), print(n,",") ) ; ) ; } \\ R. J. Mathar, Oct 12 2006

Formula

A049060(A049060(n))=2n. - R. J. Mathar, Oct 12 2006

Extensions

Corrected and extended by R. J. Mathar, Oct 12 2006
Showing 1-5 of 5 results.