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.

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

A064515 Write A064476(n) = 2^i(n)*3^j(n); sequence gives values of j(n).

Original entry on oeis.org

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

Views

Author

Vladeta Jovovic, Oct 07 2001, Oct 07 2001

Keywords

Crossrefs

Programs

  • ARIBAS
    function a064515(maxarg: integer); var j: integer; ar: array; begin ar := p2p3(maxarg); for j := 0 to maxarg - 1 do write(ar[j][2]," "); end; end; a064515(95);  (* For definition of function p2p3 see A064476. *)
    
  • Python
    from sympy import integer_log
    def A064515(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 integer_log((m:=bisection(f,n,n))>>(m-1&~m).bit_length(),3)[0] # Chai Wah Wu, Mar 26 2025

Extensions

More terms from Klaus Brockhaus, Oct 12 2001

A064518 For an integer n with prime factorization p_1*p_2*p_3* ... *p_m let n* = (p_1+1)*(p_2+1)*(p_3+1)* ... *(p_m+1); sequence gives n* such that n* is divisible by n, ordered by increasing value of n.

Original entry on oeis.org

1, 12, 36, 144, 432, 1296, 1728, 5184, 15552, 20736, 46656, 62208, 186624, 248832, 559872, 746496, 1679616, 2239488, 2985984, 6718464, 8957952, 20155392, 26873856, 60466176, 35831808, 80621568, 107495424, 241864704, 322486272
Offset: 1

Views

Author

Vladeta Jovovic, Oct 07 2001

Keywords

Comments

It is not difficult to show that these numbers have the form a(n) = 3^i*4^j with j <= i <= 2j.

Crossrefs

Every term is also a term of A064476.

Programs

  • 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, s=ns(m); if (s%m == 0, write("b064518.txt", n++, " ", s); if (n==50, break)) ) } \\ Harry J. Smith, Sep 17 2009

Formula

a(n) = 3^A064514(n) * 4^A064515(n). - Chai Wah Wu, Mar 26 2025

Extensions

Title clarified by Sean A. Irvine, Jul 15 2023

A380574 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); sequence gives k* such that k* is divisible by k.

Original entry on oeis.org

1, 12, 36, 144, 432, 1296, 1728, 5184, 15552, 20736, 46656, 62208, 186624, 248832, 559872, 746496, 1679616, 2239488, 2985984, 6718464, 8957952, 20155392, 26873856, 35831808, 60466176, 80621568, 107495424, 241864704, 322486272, 429981696, 725594112, 967458816
Offset: 1

Views

Author

Chai Wah Wu, Mar 26 2025

Keywords

Comments

Terms of A064518 in increasing order.
Numbers of the form 3^i*4^j with j <= i <= 2j.
Subsequence of A064476.

Crossrefs

Programs

  • Mathematica
    With[{max = 10^9}, Select[Flatten[Table[3^i*4^j, {j, 0, Log[12, max]}, {i, j, 2*j}]] // Sort, # <= max &]] (* Amiram Eldar, Mar 29 2025 *)
  • Python
    from sympy import integer_log
    def A380574(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((j:=i<<1),integer_log(x>>j,3)[0])-i+1) for i in range(x.bit_length()+1>>1))
        return bisection(f,n,n)

Formula

Sum_{n>=1} 1/a(n) = 432/385. - Amiram Eldar, Mar 29 2025
Showing 1-4 of 4 results.