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.

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);}