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.

A387654 Numbers k such that each of k and k+1 is either a practical number (A005153) or an almost practical number (A174533).

Original entry on oeis.org

1, 4095, 5775, 5984, 11024, 21735, 21944, 26144, 39375, 49664, 58695, 61424, 69615, 76544, 79695, 89775, 91664, 98175, 104895, 106784, 111824, 116655, 116864, 121904, 134504, 135135, 144584, 152775, 155295, 160544, 165375, 170624, 174824, 180495, 185535, 192464
Offset: 1

Views

Author

Amiram Eldar, Sep 05 2025

Keywords

Comments

Differs from A103289 by not having the terms 7424, 27404, 43064, 56924, 70784, ... . The first 344 terms of this sequence are in A103289. Is this sequence a subsequence of A103289?
Differs from A096399 by not having the terms 7424, 27404, 43064, 56924, 70784, ... . The first 342 terms after 1 and 4095 are in A096399. Is this sequence \ {1, 4095} a subsequence of A096399?
Terms k such that both k and k+1 are almost practical numbers are in A387653.
The only pair of consecutive integers that are both practical is 1 and 2, since 1 is the only odd practical number.
All the rest are pairs in which one member (the odd member) is almost practical and the second member (the even member) is practical.
Are there 3 consecutive numbers that are all either practical or almost practical? There are none below 2.8*10^6.

Crossrefs

A387653 is subsequence.

Programs

  • Mathematica
    q[n_] := q[n] = Module[{d = Divisors[n], c, x}, c = CoefficientList[Product[1 + x^i, {i, d}], x]; MemberQ[{0, 2}, Total[d] - Count[Rest[c], _?(# > 0 &)]]];
    Select[Range[40000], q[#] && q[#+1] &] (* warning: a slow program *)
  • PARI
    isp(k) = {my(d = divisors(k), nd = #d, s = vecsum(d), p = prod(i = 1, nd, 1 + 'x^d[i])); abs(#select(x -> x > 0, Col(p)) - s) == 1;}
    list(kmax) = {my(is1 = 1, is2); for(k = 2, kmax, is2 = isp(k); if(is1 && is2, print1(k-1, ", ")); is1 = is2);} \\ warning: a slow program