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.

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.

This page as a plain text file.
%I A064476 #47 Apr 21 2025 23:05:39
%S A064476 1,6,12,36,72,144,216,432,864,1296,1728,2592,5184,7776,10368,15552,
%T A064476 20736,31104,46656,62208,93312,124416,186624,248832,279936,373248,
%U A064476 559872,746496,1119744,1492992,1679616,2239488,2985984,3359232,4478976
%N 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.
%C A064476 Could be generalized by defining x* = (p_1+v)*(p_2+v) .. (p_m+v) where v is any integer.
%C A064476 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
%H A064476 Amiram Eldar, <a href="/A064476/b064476.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..50 from Harry J. Smith)
%F A064476 Sum_{n>=1} 1/a(n) = 72/55. - _Amiram Eldar_, Mar 29 2025
%e A064476 12 is in the sequence because 12 = 2 * 2 * 3, so 12* is 3 * 3 * 4 = 36 and 36 is divisible by 12.
%t A064476 diQ[n_]:=Divisible[Times@@(#+1&/@Flatten[Table[First[#],{Last[#]}]&/@ FactorInteger[n]]),n]; Select[Range[4500000],diQ] (* _Harvey P. Dale_, Aug 16 2011 *)
%t A064476 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 *)
%o A064476 (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);
%o A064476 (PARI)
%o A064476 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) }
%o A064476 { 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
%o A064476 (Haskell)
%o A064476 a064476 n = a064476_list !! (n-1)
%o A064476 a064476_list = filter (\x -> a003959 x `mod` x == 0) [1..]
%o A064476 -- _Reinhard Zumkeller_, Feb 28 2013
%o A064476 (Python)
%o A064476 from sympy import integer_log
%o A064476 def A064476(n):
%o A064476     def bisection(f,kmin=0,kmax=1):
%o A064476         while f(kmax) > kmax: kmax <<= 1
%o A064476         kmin = kmax >> 1
%o A064476         while kmax-kmin > 1:
%o A064476             kmid = kmax+kmin>>1
%o A064476             if f(kmid) <= kmid:
%o A064476                 kmax = kmid
%o A064476             else:
%o A064476                 kmin = kmid
%o A064476         return kmax
%o A064476     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))
%o A064476     return bisection(f,n,n) # _Chai Wah Wu_, Mar 26 2025
%Y A064476 Cf. A064478, A064514, A064515, A064518, A064522, A003959.
%K A064476 nonn,easy,nice
%O A064476 1,2
%A A064476 Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 06 2001
%E A064476 More terms from _Vladeta Jovovic_, Oct 07 2001