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

A364706 a(n) is the least number k such that the k-th difference between consecutive practical numbers, A179651(k), equals 2*n, or -1 if no such k exists.

Original entry on oeis.org

2, 5, 16, 33, 85, 46, 331, 188, 171, 300, 1986, 962, 3321, 968, 2316, 6514, 9974, 3219, 12162, 3831, 4588, 20585, 30099, 22005, 30465, 33485, 28874, 35901, 136396, 48483, 120127, 34145, 140589, 233364, 126080, 185421, 607164, 279989, 359002, 327768, 609867, 354143
Offset: 1

Views

Author

Amiram Eldar, Aug 04 2023

Keywords

Comments

All the practical number except for 1 are even. Therefore all the differences between consecutive practical numbers are either 1 or even.

Examples

			a(1) = 2 since A179651(2) = 2 = 2*1.
a(2) = 5 since A179651(5) = 4 = 2*2.
a(3) = 16 since A179651(16) = 6 = 2*3.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[n_] := (ind = Position[(fct = FactorInteger[n])[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most @ fct]), _?(# > 1 &)]) == {};
    seq[len_, nmax_] := Module[{s = Table[0, {len}], n = 2, prev = 2, k = 2, c = 0, i}, While[c < len && n <= nmax, n+=2; If[pracQ[n], i = (n - prev)/2; If[i <= len && s[[i]] == 0, c++; s[[i]] = k]; prev= n; k++]]; s]; seq[20, 10^6]

Formula

A179651(a(n)) = 2*n.
A005153(a(n)) = A364707(n).

A364707 a(n) is the least practical number A005153(k) such that A005153(k+1) - A005153(k) = 2*n, or -1 if no such number exists.

Original entry on oeis.org

2, 8, 42, 112, 368, 180, 1806, 936, 840, 1600, 14168, 6216, 25120, 6272, 16770, 52668, 83720, 24240, 103840, 29440, 35910, 184140, 278334, 197912, 282150, 313040, 266112, 337840, 1438722, 468540, 1254016, 319808, 1486584, 2566432, 1321376, 2003688, 7163646, 3121328
Offset: 1

Views

Author

Amiram Eldar, Aug 04 2023

Keywords

Examples

			a(1) = 2 since A005153(2) = 2 and A005153(3) = 4 = 2 + 2*1.
a(2) = 8 since A005153(5) = 8 and A005153(6) = 12 = 8 + 2*2.
a(3) = 42 since A005153(16) = 42 and A005153(17) = 48 = 42 + 2*3.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[n_] := (ind = Position[(fct = FactorInteger[n])[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most @ fct]), _?(# > 1 &)]) == {};
    seq[len_, nmax_] := Module[{s = Table[0, {len}], n = 2, prev = 2, c = 0, i}, While[c < len && n <= nmax, n+=2; If[pracQ[n], i = (n - prev)/2; If[i <= len && s[[i]] == 0, c++; s[[i]] = prev]; prev= n]]; s]; seq[20, 10^6]

Formula

a(n) = A005153(A364706(n)).
Showing 1-2 of 2 results.