login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2

%I #9 Aug 04 2023 10:13:48

%S 2,8,42,112,368,180,1806,936,840,1600,14168,6216,25120,6272,16770,

%T 52668,83720,24240,103840,29440,35910,184140,278334,197912,282150,

%U 313040,266112,337840,1438722,468540,1254016,319808,1486584,2566432,1321376,2003688,7163646,3121328

%N 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.

%H Amiram Eldar, <a href="/A364707/b364707.txt">Table of n, a(n) for n = 1..150</a>

%F a(n) = A005153(A364706(n)).

%e a(1) = 2 since A005153(2) = 2 and A005153(3) = 4 = 2 + 2*1.

%e a(2) = 8 since A005153(5) = 8 and A005153(6) = 12 = 8 + 2*2.

%e a(3) = 42 since A005153(16) = 42 and A005153(17) = 48 = 42 + 2*3.

%t 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 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]

%Y Cf. A005153, A179651, A330870, A364706.

%K nonn

%O 1,1

%A _Amiram Eldar_, Aug 04 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 28 10:08 EDT 2024. Contains 374686 sequences. (Running on oeis4.)