OFFSET
1,1
COMMENTS
All the practical number except for 1 are even. Therefore all the differences between consecutive practical numbers are either 1 or even.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..150
EXAMPLE
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]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Aug 04 2023
STATUS
approved