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

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