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

A064476 For an integer k with prime factorization p_1*p_2*p_3* ... *p_m let k* = (p_1+1)*(p_2+1)*(p_3+1)* ... *(p_m+1) (A064478); sequence gives k such that k* is divisible by k.

Original entry on oeis.org

1, 6, 12, 36, 72, 144, 216, 432, 864, 1296, 1728, 2592, 5184, 7776, 10368, 15552, 20736, 31104, 46656, 62208, 93312, 124416, 186624, 248832, 279936, 373248, 559872, 746496, 1119744, 1492992, 1679616, 2239488, 2985984, 3359232, 4478976
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 06 2001

Keywords

Comments

Could be generalized by defining x* = (p_1+v)*(p_2+v) .. (p_m+v) where v is any integer.
It is not difficult to show that these numbers have the form 2^i*3^j with j <= i <= 2j. Hence 1 is the only odd term; also if k|k* then k*|k**. The values of i and j are given in A064514 and A064515. - Vladeta Jovovic and N. J. A. Sloane, Oct 07 2001

Examples

			12 is in the sequence because 12 = 2 * 2 * 3, so 12* is 3 * 3 * 4 = 36 and 36 is divisible by 12.
		

Crossrefs

Programs

  • ARIBAS
    function p2p3(stop:integer): array; var c,i,j,x: integer; b: boolean; ar: array; begin ar := alloc(array,stop); x := 0; c := 0; b := c < stop; while b do i := x; j := x - i; while b and i >= j do if i <= 2*j then ar[c] := (2^i * 3^j,i,j); inc(c); b := c < stop; end; dec(i); inc(j); end; inc(x); end; return sort(ar, comparefirst); end; function comparefirst(x,y: array): integer; begin return y[0] - x[0]; end; function a064476(maxarg: integer); var j: integer; ar: array; begin ar := p2p3(maxarg); for j := 0 to maxarg - 1 do write(ar[j][0]," "); end; end; a064476(35);
    
  • Haskell
    a064476 n = a064476_list !! (n-1)
    a064476_list = filter (\x -> a003959 x `mod` x == 0) [1..]
    -- Reinhard Zumkeller, Feb 28 2013
    
  • Mathematica
    diQ[n_]:=Divisible[Times@@(#+1&/@Flatten[Table[First[#],{Last[#]}]&/@ FactorInteger[n]]),n]; Select[Range[4500000],diQ] (* Harvey P. Dale, Aug 16 2011 *)
    With[{max = 5*10^6}, Select[Flatten[Table[2^i*3^j, {j, 0, Log[6, max]}, {i, j, 2*j}]] // Sort, # <= max &]] (* Amiram Eldar, Mar 29 2025 *)
  • PARI
    ns(n)= { local(f,p=1); f=factor(n); for(i=1, matsize(f)[1], p*=(1 + f[i, 1])^f[i, 2]); return(p) }
    { n=0; for (m=1, 10^9, if (ns(m)%m == 0, write("b064476.txt", n++, " ", m); if (n==100, break)) ) } \\ Harry J. Smith, Sep 15 2009
    
  • Python
    from sympy import integer_log
    def A064476(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(max(0,min((i<<1)+1,(x//3**i).bit_length())-i) for i in range(integer_log(x,3)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 26 2025

Formula

Sum_{n>=1} 1/a(n) = 72/55. - Amiram Eldar, Mar 29 2025

Extensions

More terms from Vladeta Jovovic, Oct 07 2001

A064479 Complement of A064478.

Original entry on oeis.org

5, 7, 10, 11, 13, 15, 17, 19, 21, 22, 23, 25, 26, 28, 29, 31, 33, 34, 35, 37, 39, 40, 41, 43, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 63, 65, 66, 67, 69, 70, 71, 73, 75, 76, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 97, 99, 100, 101, 103, 105
Offset: 0

Views

Author

N. J. A. Sloane, Oct 06 2001

Keywords

Comments

Sequence includes all odd positive integers except powers of 3.

Crossrefs

Extensions

More terms and comment from Matthew Conroy, Oct 17 2001

A003959 If n = Product p(k)^e(k) then a(n) = Product (p(k)+1)^e(k), a(1) = 1.

Original entry on oeis.org

1, 3, 4, 9, 6, 12, 8, 27, 16, 18, 12, 36, 14, 24, 24, 81, 18, 48, 20, 54, 32, 36, 24, 108, 36, 42, 64, 72, 30, 72, 32, 243, 48, 54, 48, 144, 38, 60, 56, 162, 42, 96, 44, 108, 96, 72, 48, 324, 64, 108, 72, 126, 54, 192, 72, 216, 80, 90, 60, 216, 62, 96, 128, 729, 84, 144, 68
Offset: 1

Views

Author

Keywords

Comments

Completely multiplicative.
Sum of divisors of n with multiplicity. If n = p^m, the number of ways to make p^k as a divisor of n is C(m,k); and sum(C(m,k)*p^k) = (p+1)^k. The rest follows because the function is multiplicative. - Franklin T. Adams-Watters, Jan 25 2010

Crossrefs

Programs

  • Haskell
    a003959 1 = 1
    a003959 n = product $ map (+ 1) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012
  • Maple
    a:= n-> mul((i[1]+1)^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017
  • Mathematica
    a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]]+1)^fi[[All, 2]])); a /@ Range[67] (* Jean-François Alcover, Apr 22 2011 *)
  • PARI
    a(n)=if(n<1,0,direuler(p=2,n,1/(1-X-p*X))[n]) /* Ralf Stephan */
    

Formula

Multiplicative with a(p^e) = (p+1)^e. - David W. Wilson, Aug 01 2001
Sum_{n>0} a(n)/n^s = Product_{p prime} 1/(1-p^(-s)-p^(1-s)) (conjectured). - Ralf Stephan, Jul 07 2013
This follows from the absolute convergence of the sum (compare with a(n) = n^2) and the Euler product for completely multiplicative functions. Convergence occurs for at least Re(s)>3. - Thomas Anton, Jul 15 2021
Sum_{k=1..n} a(k) ~ c * n^2, where c = A065488/2 = 1/(2*A005596) = 1.3370563627850107544802059152227440187511993141988459926... - Vaclav Kotesovec, Jul 17 2021
From Thomas Scheuerle, Jul 19 2021: (Start)
a(n) = gcd(A166642(n), A166643(n)).
a(n) = A166642(n)/A061142(n).
a(n) = A166643(n)/A165824(n).
a(n) = A166644(n)/A165825(n).
a(n) = A166645(n)/A165826(n).
a(n) = A166646(n)/A165827(n).
a(n) = A166647(n)/A165828(n).
a(n) = A166649(n)/A165830(n).
a(n) = A166650(n)/A165831(n).
a(n) = A167351(n)/A166590(n). (End)
Dirichlet g.f.: zeta(s-1) * Product_{primes p} (1 + 1/(p^s - p - 1)). - Vaclav Kotesovec, Aug 22 2021

Extensions

Definition reedited (with formula) by Daniel Forgues, Nov 17 2009

A327564 If n = Product (p_j^k_j) then a(n) = Product ((p_j + 1)^(k_j - 1)).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 9, 4, 1, 1, 3, 1, 1, 1, 27, 1, 4, 1, 3, 1, 1, 1, 9, 6, 1, 16, 3, 1, 1, 1, 81, 1, 1, 1, 12, 1, 1, 1, 9, 1, 1, 1, 3, 4, 1, 1, 27, 8, 6, 1, 3, 1, 16, 1, 9, 1, 1, 1, 3, 1, 1, 4, 243, 1, 1, 1, 3, 1, 1, 1, 36, 1, 1, 6, 3, 1, 1, 1, 27, 64, 1, 1, 3, 1
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 03 2020

Keywords

Examples

			a(12) = a(2^2 * 3) = (2 + 1)^(2 - 1) * (3 + 1)^(1 - 1) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ ((#[[1]] + 1)^(#[[2]] - 1) & /@ FactorInteger[n]); Table[a[n], {n, 1, 85}]
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1]++; f[k,2]--); factorback(f); \\ Michel Marcus, Mar 03 2020

Formula

a(1) = 1; a(n) = -Sum_{d|n, dA001221(n/d) * A003557(n/d) * a(d).
a(n) = A003959(n) / A048250(n) = A003968(n) / A007947(n).
a(n) = A348038(n) * A348039(n) = A340368(n) / A173557(n). - Antti Karttunen, Oct 29 2021
Dirichlet g.f.: 1/(zeta(s-1) * Product_{p prime} (1 - 1/p^(s-1) - 1/p^s)). - Amiram Eldar, Dec 07 2023

A326297 If n = Product (p_j^k_j) then a(n) = Product ((p_j - 1)^(k_j - 1)).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Mar 03 2020

Keywords

Examples

			a(98) = a(2 * 7^2) = (2 - 1)^(1 - 1) * (7 - 1)^(2 - 1) = 6.
		

Crossrefs

Programs

  • Maple
    seq(mul((p-1)^(padic[ordp](n,p)-1), p in numtheory[factorset](n)), n =1..100); # Ridouane Oudra, Oct 29 2024
  • Mathematica
    a[n_] := If[n == 1, 1, Times @@ ((#[[1]] - 1)^(#[[2]] - 1) & /@ FactorInteger[n])]; Table[a[n], {n, 1, 100}]
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1]--; f[k,2]--); factorback(f); \\ Michel Marcus, Mar 03 2020
    
  • Python
    from math import prod
    from sympy import factorint
    def a(n): return prod((p-1)**(e-1) for p, e in factorint(n).items())
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 30 2021

Formula

a(n) = A003958(n) / abs(A023900(n)) = abs(A325126(n)) / A007947(n).
Dirichlet g.f.: Product_{p prime} (1 + 1/(p^s - p + 1)). - Amiram Eldar, Dec 07 2023
a(n) = A003958(n)/A173557(n). - Ridouane Oudra, Oct 29 2024

A304411 If n = Product (p_j^k_j) then a(n) = Product ((p_j + 1)*k_j).

Original entry on oeis.org

1, 3, 4, 6, 6, 12, 8, 9, 8, 18, 12, 24, 14, 24, 24, 12, 18, 24, 20, 36, 32, 36, 24, 36, 12, 42, 12, 48, 30, 72, 32, 15, 48, 54, 48, 48, 38, 60, 56, 54, 42, 96, 44, 72, 48, 72, 48, 48, 16, 36, 72, 84, 54, 36, 72, 72, 80, 90, 60, 144, 62, 96, 64, 18, 84, 144, 68, 108, 96, 144, 72, 72
Offset: 1

Views

Author

Ilya Gutkovskiy, May 12 2018

Keywords

Examples

			a(24) = a(2^3*3) = (2 + 1)*3 * (3 + 1)*1 = 36.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ ((#[[1]] + 1) #[[2]] & /@ FactorInteger[n]); a[1] = 1; Table[a[n], {n, 72}]
    Table[Total[Select[Divisors[n], SquareFreeQ]] DivisorSigma[0, n/Last[Select[Divisors[n], SquareFreeQ]]], {n, 72}]
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); (p+1)*e)} \\ Andrew Howroyd, Jul 24 2018

Formula

a(n) = A005361(n)*A048250(n) = A000005(n/A007947(n))*A000203(A007947(n)).
a(p^k) = (p + 1)*k where p is a prime and k > 0.
a(n) = Product_{p|n} (p + 1) if n is a squarefree (A005117).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/12) * Product_{p prime} (1 - 1/p^2 + 1/p^3) = A072691 * A330596 = 0.6156455744... . - Amiram Eldar, Nov 30 2022

A132705 For an integer n with prime factorization (p_1)*(p_2)*(p_3)* ... *(p_k), a(n) = (p_1+2)*(p_2+2)*(p_3+2)* ... *(p_k+2).

Original entry on oeis.org

2, 3, 4, 5, 16, 7, 20, 9, 64, 25, 28, 13, 80, 15, 36, 35, 256, 19, 100, 21, 112, 45, 52, 25, 320, 49, 60, 125, 144, 31, 140, 33, 128, 65, 76, 63, 400, 49, 84, 75, 448, 43, 180, 45, 208, 175, 100, 49, 1280, 81, 196, 95, 240, 55, 500, 91, 576, 105, 124, 60
Offset: 0

Views

Author

Jonathan Vos Post, Nov 16 2007

Keywords

Comments

a(0)=2 and a(1)=3 by convention. For an integer n with prime factorization prime(i_1)*prime(i_2)*prime(i_3)* ... *prime(i_k), a(n) = A052147(i_1)*A052147(i_2)*A052147(i_3)* ... *A052147(i_k). This sequence is to p+2 as A064478 is to p+1 for primes p.
If a(1) were 1 rather than 3, the sequence would be completely multiplicative with a(p) = p + 2. - Charles R Greathouse IV, Sep 02 2009

Crossrefs

Programs

  • Python
    from math import prod
    from sympy import factorint
    def A132705(n): return prod((p+2)**e for p,e in factorint(n).items()) if n!=1 else 3 # Chai Wah Wu, Mar 26 2025
Showing 1-7 of 7 results.