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.

A331371 Numbers k such that k and k+1 are both half-Zumkeller numbers (A246198).

Original entry on oeis.org

224, 440, 1224, 2024, 3968, 5624, 11024, 18224, 35720, 38024, 50624, 53360, 65024, 74528, 81224, 140624, 148224, 159200, 164024, 184040, 189224, 194480, 207024, 216224, 233288, 245024, 314720, 354024, 370880, 378224, 416024, 423800, 442224, 455624, 497024, 511224
Offset: 1

Views

Author

Amiram Eldar, May 03 2020

Keywords

Examples

			224 is a term since both 224 and 225 are half-Zumkeller numbers: the proper divisors of 224 are {1, 2, 4, 7, 8, 14, 16, 28, 32, 56, 112} and 1 + 2 + 4 + 7 + 8 + 14 + 16 + 32 + 56 = 28 + 112, and the proper divisors of 225 are {1, 3, 5, 9, 15, 25, 45, 75} and 1 + 3 + 15 + 25 + 45 = 5 + 9 + 75.
		

Crossrefs

Programs

  • Mathematica
    hzQ[n_] := Module[{d = Most @ Divisors[n], sum, x}, sum = Plus @@ d; EvenQ[sum] && CoefficientList[Product[1 + x^i, {i, d}], x][[1 + sum/2]] > 0]; hzq1 = False; s = {}; Do[hzq2 = hzQ[n]; If[hzq1 && hzq2, AppendTo[s, n - 1]]; hzq1 = hzq2, {n, 2, 6000}]; s

A345704 Zumkeller numbers k (A083207) such that the next Zumkeller number is k + 12.

Original entry on oeis.org

282, 840, 1596, 1794, 1920, 2496, 2928, 3108, 3522, 3540, 3594, 4008, 4188, 4602, 4620, 4998, 5268, 5862, 6060, 6708, 6888, 7086, 7788, 7968, 8382, 8400, 9048, 9840, 10362, 10542, 10920, 11100, 11568, 12126, 12162, 12180, 13422, 14106, 14322, 14394, 14880, 15348
Offset: 1

Views

Author

Amiram Eldar, Jun 24 2021

Keywords

Comments

Frank Buss and T. D. Noe conjectured (see A083207) and Robert Gerbicz proved that the largest possible gap between Zumkeller numbers is 12 (SeqFan post, 2010). A proof was also published by Mahanta et al. (2020).

Examples

			282 is a term since it is a Zumkeller number, and the next Zumkeller number is 282 + 12 = 294.
		

Crossrefs

Programs

  • Maple
    iszum:= proc(n) local D,s,P,d;
       D:= numtheory:-divisors(n);
       s:= convert(D,`+`);
       if s::odd then return false fi;
       P:= mul(1+x^d,d=D);
       coeff(P,x,s/2) > 0
    end proc:
    last:= 6: R:= NULL: count:= 0:
    for i from 7 while count < 60 do
      if iszum(i) then
         if i-last = 12 then R:= R, last; count:= count+1 fi;
         last:= i;
      fi
    od:
    R; # Robert Israel, Feb 13 2023
  • Mathematica
    zumQ[n_] := Module[{d = Divisors[n], sum, x}, sum = Plus @@ d;  EvenQ[sum] && CoefficientList[Product[1 + x^i, {i, d}], x][[1 + sum/2]] > 0]; z = Select[Range[5000], zumQ]; z[[Position[Differences[z], 12] // Flatten]]
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A345704_gen(startvalue=1): # generator of terms >= startvalue
        m = -20
        for n in count(max(startvalue,1)):
            d = divisors(n)
            s = sum(d)
            if s&1^1 and n<<1<=s:
                d = d[:-1]
                s2, ld = (s>>1)-n, len(d)
                z = [[0 for  in range(s2+1)] for  in range(ld+1)]
                for i in range(1, ld+1):
                    y = min(d[i-1], s2+1)
                    z[i][:y] = z[i-1][:y]
                    for j in range(y,s2+1):
                        z[i][j] = max(z[i-1][j],z[i-1][j-y]+y)
                    if z[i][s2] == s2:
                        if m == n-12:
                            yield m
                        m = n
                        break
    A345704_list = list(islice(A345704_gen(),10)) # Chai Wah Wu, Feb 13 2023

A361934 Numbers k such that k and k+1 are both primitive Zumkeller numbers (A180332).

Original entry on oeis.org

82004, 84524, 158235, 516704, 2921535, 5801984, 10846016, 12374144, 12603824, 18738224, 24252074, 24887655, 25691984, 32409530, 33696975, 35356544, 36149295, 41078114, 42541190, 43485584
Offset: 1

Views

Author

Amiram Eldar, Mar 31 2023

Keywords

Examples

			82004 is a term since 82004 and 82005 are both primitive Zumkeller numbers.
		

Crossrefs

Subsequence of A180332 and A328327.
Similar sequences: A283418, A330872, A334882.

Programs

  • Mathematica
    q[n_, d_, s1_, m1_] := Module[{s = s1, m = m1}, If[m == 0, False, While[d[[m]] > n, s -= d[[m]]; m--]; d[[m]] == n || If[s > n, q[n - d[[m]], d, s - d[[m]], m - 1] || q[n, d, s - d[[m]], m - 1], n == s]]];
    (* after M. F. Hasler's pari code at A006037 *)
    zumQ[n_] := Module[{d = Most[Divisors[n]], m, s}, m = Length[d]; s = Total[d]; If[OddQ[s + n], False, q[(s + n)/2, d, s, m]]];
    primZumQ[n_] := zumQ[n] && AllTrue[Most[Divisors[n]], ! zumQ[#] &];
    seq[kmax_] := Module[{s = {}, zq1 = False, zq2}, Do[zq2 = primZumQ[k]; If[zq1 && zq2, AppendTo[s, k - 1]]; zq1 = zq2, {k, 2, kmax}]; s]; seq[3*10^6]
  • PARI
    is1(n,d,s,m) = {m||return; while(d[m]>n, s-=d[m]; m--||return); d[m]==n || if(nM. F. Hasler at A006037
    isZum(n) = {my(d = divisors(n)[^-1], s = vecsum(d), m = #d); if((s+n)%2, return(0), is1((s+n)/2, d, s, m)); }
    isPrimZum(n) = {if(!isZum(n), return(0)); fordiv(n, d, if(d < n && isZum(d), return(0))); 1;}
    lista(kmax) = {my(is1 = 0, is2); for(k = 2, kmax, is2 = isPrimZum(k); if(is1 && is2, print1(k-1, ", ")); is1 = is2);}
Showing 1-3 of 3 results.