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.

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.

This page as a plain text file.
%I A364706 #11 Aug 04 2023 10:14:26
%S A364706 2,5,16,33,85,46,331,188,171,300,1986,962,3321,968,2316,6514,9974,
%T A364706 3219,12162,3831,4588,20585,30099,22005,30465,33485,28874,35901,
%U A364706 136396,48483,120127,34145,140589,233364,126080,185421,607164,279989,359002,327768,609867,354143
%N 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.
%C A364706 All the practical number except for 1 are even. Therefore all the differences between consecutive practical numbers are either 1 or even.
%H A364706 Amiram Eldar, <a href="/A364706/b364706.txt">Table of n, a(n) for n = 1..150</a>
%F A364706 A179651(a(n)) = 2*n.
%F A364706 A005153(a(n)) = A364707(n).
%e A364706 a(1) = 2 since A179651(2) = 2 = 2*1.
%e A364706 a(2) = 5 since A179651(5) = 4 = 2*2.
%e A364706 a(3) = 16 since A179651(16) = 6 = 2*3.
%t A364706 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 &)]) == {};
%t A364706 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]
%Y A364706 Cf. A005153, A179651, A330870, A364707.
%K A364706 nonn
%O A364706 1,1
%A A364706 _Amiram Eldar_, Aug 04 2023