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.

A334883 Primitive practical numbers (A267124) with a record gap to the next primitive practical number.

Original entry on oeis.org

1, 2, 6, 42, 104, 140, 1036, 1590, 2730, 7900, 10374, 19180, 22660, 23180, 26418, 105868, 114960, 139060, 295780, 403524, 482250, 1294144, 2468944, 4799058, 5379282, 19035500, 20233936, 21803860, 112406992, 789190976, 3520928922
Offset: 1

Views

Author

Amiram Eldar, May 14 2020

Keywords

Comments

The record gap values are 1, 4, 14, 24, 36, 64, 74, 82, 84, 104, 106, 112, 120, 132, 154, 188, 204, 224, 236, 246, 258, 308, 326, 360, 418, 440, 452, 508, 674, 804, 846, ...

Examples

			The first 8 primitive practical numbers are 1, 2, 6, 20, 28, 30, 42 and 66. The differences between these terms are 1, 4, 14, 8, 2, 12 and 24. The record gaps are 1, 4, 14 and 24, which occur after the terms 1, 2, 6 and 42.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[fct_] := (ind = Position[fct[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most@fct]), ?(# > 1 &)]) == {}; pracTestQ[fct, k_] := Module[{f = fct}, f[[k, 2]] -= 1; pracQ[f]]; primPracQ[n_] := Module[{fct = FactorInteger[n]}, pracQ[fct] && AllTrue[Range@Length[fct], fct[[#, 2]] == 1 || ! pracTestQ[fct, #] &]]; seq = {1}; m = 2; dm = 1; Do[If[primPracQ[n], d = n - m; If[d > dm, dm = d; AppendTo[seq, m]]; m = n], {n, 4, 10^5, 2}]; seq

A334900 Numbers k such that k and k+2 are both bi-unitary practical numbers (A334898).

Original entry on oeis.org

6, 30, 40, 54, 510, 544, 798, 918, 928, 1120, 1240, 1288, 1408, 1480, 1566, 1672, 1720, 1768, 1792, 1888, 1950, 1974, 2046, 2430, 2440, 2560, 2728, 2814, 2838, 2968, 3198, 3318, 4134, 4158, 4264, 4422, 4480, 4758, 5248, 6102, 6270, 6424, 6942, 7590, 7830, 9280
Offset: 1

Views

Author

Amiram Eldar, May 16 2020

Keywords

Examples

			6 is a term since 6 and 6 + 2 = 8 are both bi-unitary practical numbers.
		

Crossrefs

Programs

  • Mathematica
    biunitaryDivisorQ[div_, n_] := If[Mod[#2, #1] == 0, Last@Apply[Intersection, Map[Select[Divisors[#], Function[d, CoprimeQ[d, #/d]]] &, {#1, #2/#1}]] == 1, False] & @@ {div, n}; bdivs[n_] := Module[{d = Divisors[n]}, Select[d, biunitaryDivisorQ[#, n] &]]; bPracQ[n_] := Module[{d = bdivs[n], sd, x}, sd = Plus @@ d; Min @ CoefficientList[Series[Product[1 + x^d[[i]], {i, Length[d]}], {x, 0, sd}], x] >  0]; seq = {}; q1 = bPracQ[2]; Do[q2 = bPracQ[n]; If[q1 && q2, AppendTo[seq, n - 2]]; q1 = q2, {n, 4, 1000, 2}]; seq

A334903 Numbers k such that k and k+2 are both infinitary practical numbers (A334901).

Original entry on oeis.org

6, 40, 54, 918, 1240, 1288, 1408, 1480, 1672, 1720, 1768, 1974, 2440, 2728, 2838, 2968, 3198, 3318, 4134, 4264, 4422, 4480, 4758, 5248, 6102, 6270, 6424, 7590, 7830, 10624, 11128, 13110, 13182, 14248, 15496, 15928, 16254, 16768, 18088, 19864, 21112, 21318, 21630
Offset: 1

Views

Author

Amiram Eldar, May 16 2020

Keywords

Examples

			6 is a term since 6 and 6 + 2 = 8 are both infinitary practical numbers.
		

Crossrefs

Programs

  • Mathematica
    bin[n_] := 2^(-1 + Position[Reverse @ IntegerDigits[n, 2], ?(# == 1 &)] // Flatten); f[p, e_] := p^bin[e]; icomp[n_] := Flatten[f @@@ FactorInteger[n]]; fun[p_, e_] := Module[{b = IntegerDigits[e, 2]}, m = Length[b]; Product[If[b[[j]] > 0, 1 + p^(2^(m - j)), 1], {j, 1, m}]]; isigma[1] = 1; isigma[n_] := Times @@ fun @@@ FactorInteger[n]; infPracQ[n_] := Module[{f, p, e, prod = 1, ok = True}, If[n < 1 || (n > 1 && OddQ[n]), False, If[n == 1, True, r = Sort[icomp[n]]; Do[If[r[[i]] > 1 + isigma[prod], ok = False; Break[]]; prod = prod*r[[i]], {i, Length[r]}]; ok]]]; seq = {}; q1 = infPracQ[2]; Do[q2 = infPracQ[n]; If[q1 && q2, AppendTo[seq, n - 2]]; q1 = q2, {n, 4, 10^4, 2}]; seq

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